c++ - using 'new' operator -
i have simple task concerning 'new' operator. need create array of 10 chars , input chars using 'cin'. should ? :
char c = new char[10]; for(int i=0; < 10; i++) { cin >> char[i] >> endl; }
no. try char* c = new char[10];
.
Comments
Post a Comment