,...
char* p1 = "some string";
... p - , char*. , char char -. - , : -).
, , const pointee, ...
char const* p2 = "some string";
, , Undefined . ++ p1 C. ++, , , , p2 .
p2 const, , . , char - .
, 4 8 .
,...
char a[] = "some string";
... a - , , -. char . sizeof(a) , a 12 , 11 .
C ++, a, , , , . C . ++ , .
, ...
sizeof(a)/sizeof(*a)
, a , .
, , , .
C , , ( ).
++ , , ...
typedef ptrdiff_t Size;
template< class T, Size N >
Size countOf( T const (&)[N] ) { return N; }
countOf , .
++ startOf endOf, . , , , . Wordpress, , , , ( , !:-)).
++ , C .
, std::vector " ".
std::vector, , , , .
hth.,
- Alf