Hey, I'm new to C++ (1 week, used to do Python), and it's very enjoyable, but I have an issue. In the following code:
int sizeofarray; cout << "Type size of array: "; cin >> sizeofarray; int myarray[sizeofarray]; ...........more code
That isn't the code, but that is the EXACT situation and context my problem is. I have tried using the dynamic pointer method (if that is even how you would handle this situation), but it didn't work (even though I probably misdid it, but I couldn't find a very clear explanation of how to do it anyway). Any help would GREATLY be appreciated! :)
I'm sorry, I forgot to even post my problem, even though it's obviously evident to you l33t hacker people. During the building process, the compiler requirees 'myarray' to have a defined size, even though it can only be inputted at runtime.