c++ - Arrays cannot be half of a number -
an array cannot have declarated size of half right? isn't possible correct?
arraya[1.5];
your understanding correct:
8.3.4 arrays
in declarationt ddhas formd1 [constant-expression opt ], type of identifier in declarationt d1“derived-declarator-type-listt,” type of identifier ofdarray type.tcalled array element type; type shall not reference type, (possibly cv-qualified) type void, function type or abstract class type. if constant-expression (5.19) present, shall integral constant expression , value shall greater zero.(international standard iso/iec 14882 second edition 2003-10-15, emphasis added)
Comments
Post a Comment