using 'new' operator

Posted by notLikeCpp on Stack Overflow See other posts from Stack Overflow or by notLikeCpp
Published on 2010-04-27T07:18:06Z Indexed on 2010/04/27 7:23 UTC
Read the original article Hit count: 246

Filed under:
|
|

I have simple task concerning 'new' operator. I need to create array of 10 chars and then input those chars using 'cin'. Should it look like this ? :

char c = new char[10];
for(int i=0; i < 10; i++)
{
    cin >> char[i] >> endl;
}

© Stack Overflow or respective owner

Related posts about c++

Related posts about homework