1 char pp[100]; 2 char *kl = pp; 3 strcpy(kl,"23456"); 4 kl += 7; 5 strcpy(kl,"abcde"); //this will not show,because 0 is before them 6 cout << pp << "33" << endl; 7 //cout << pp+7 << "33" << endl;
时间: 2024-10-06 13:05:37
1 char pp[100]; 2 char *kl = pp; 3 strcpy(kl,"23456"); 4 kl += 7; 5 strcpy(kl,"abcde"); //this will not show,because 0 is before them 6 cout << pp << "33" << endl; 7 //cout << pp+7 << "33" << endl;