Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C++ query

Name: Anonymous 2010-05-06 13:08

  
    int listsize, count;
    cout<<"Define size of list: ";
    cin>>listsize;
    cout<<endl;
    int list[listsize];


Are there any problems with this? It works fine but I just want to make sure I'm not committing a faux pas.

Name: Anonymous 2010-05-07 15:28

Spoilers: in Sepples, dynamic array sizes like that are just syntactic sugar for malloc, and perfectly valid. All these people complaining about static versus dynamic memory are idiots.
All of the ones telling you to use C instead are right, though.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List