学习指针
指针:
要去学习了
#include <iostream> using namespace std; int main() { char str[30] = { 0 }; cin.getline(str, sizeof(str)); int m; cin >> m; // write your code here...... char *p = NULL; p = &str[m-1]; cout << p; return 0; }
#include <iostream> using namespace std; int main() { char str[30] = { 0 }; cin.getline(str, sizeof(str)); int m; cin >> m; // write your code here...... char *p = NULL; p = &str[m-1]; cout << p; return 0; }
相关推荐