摘要:
#include #include #include int main() { char* p = "123"; printf("%d\n", sizeof(p));//4 printf("%d\n", strlen(p));//3 std::cout << p + 1;//"23" return 0; } 阅读全文
摘要:
#include int main() { int a = 90; int*p = &a; printf("%p\n", p);//0138FE90 int* b = p + 1;//此处指针加1,移动4个字节,所以指针的值加4 printf("%p\n", b);//0138FE94 int c = b - p;//... 阅读全文