void print_multiple(int* pint, int dim1, int dim2, int dim3){
int (*pointer3d)[dim2][dim3];
int (*pointer2d)[dim3];
for(int i = 0; i < dim1; ++i){
pointer3d += i;
for(int j = 0; j < dim2; ++j){
pointer2d += j;
for(int k = 0; k < dim3; ++k){
//???
}
}
}
}
char* rev(const char* str){
int length = 0;
const char* pointer_string = str;
while(*pointer_string){
length++;
if(*(pointer_string+1)) pointer_string++;
else break;
}
char* new_char = new char[length + 1];
char* pnew_char = new_char;
for(int i = 0; i < length; ++i)
*pnew_char++ = *pointer_string--;
return new_char;
}
char* rev(const char* str){
int length = 0;
const char* pointer_string = str;
while(*pointer_string){
length++;
if(*(pointer_string+1)) pointer_string++;
else break;
}
char* new_char = new char[length + 1];
for(char* pnew_char = new_char; *pnew_char++ = *pointer_string--;);
return new_char;
}
int main(int argc, char *argv[])
{
cout << rev("hello") << '\n';
}
не строковый литерал, а набор символов?