Looking for help/solutions to practice problems that I get stuck on.
Anyone out there?
Looking for help/solutions to practice problems that I get stuck on.
Anyone out there?
You could always post the practice problem, your attempted solution, and what difficulties you faced.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
Thanks. Just tried that. The link is dead.
The following errors occurred with your submission
- Please use code tags: insert
after it in order to post. See Posting Code - Read this First for more information.Code:before your source code and
It's telling you to put [code][/code] tags around your code.
So your post looks like this.
Code:int main ( ) { printf("Hello world\n"); }
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
Code:void insertion_sort (int size) // A function, int or void?, that allows the array size to be variable. int array[ ] { // Tried this---> int array[ number ]; cout << "Input desired array size: """; // Trying to have the user input the array size at the beginning. cin >> size; // Tried this---> cin >> array[number]; }
Vectors are used in situations where size of the array cannot be predetermined. They come with a bunch of handful functions along with them and have been a part of c++ since '98 compilers at least.
Thanks. I'm going to look into vectors.