Указатели на символы и указатели на целые числа (++)C++

Программы на C++. Форум разработчиков
Anonymous
Указатели на символы и указатели на целые числа (++)

Сообщение Anonymous »


У меня есть два указателя

Код: Выделить всё

char *str1;
int *str2;
If I look at the size of both the pointers let’s assume

Код: Выделить всё

str1=4 bytes
str2=4 bytes
str1++ will increment by 1 byte, but if str2++ it will increment 4 bytes.

What is the concept behind this?


Источник: https://stackoverflow.com/questions/260 ... r-pointers

Вернуться в «C++»