Looking for help/solutions to practice problems that I get stuck on.
Anyone out there?
Printable View
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.
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");
}
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.