- Upvotes Received
- 2
- Posts with Upvotes
- 2
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
I am trying to delete an element in my vector but my program crashes after each run. The vector is loaded with integers. [CODE] vector<int> vec(30); vec.erase(vec.begin() + 5); [/CODE] Is this the proper way to delete from a vector? |
|
My program generates a list of random or pseudo random numbers between a certain range specified by the user through the console. My problem is when the user, or in this case myself, tries to generate a random number list specified by entering true(1) in the console the output is … |
|
Hey guys I have been having lots of problems getting my animation to not flicker. I have read that double buffering is a good way to stop the flickering but everything I have tried doesn't do anything to help. If you could please help me understand what I am doing … |
|
I wrote a program that compares two strings and tests to see if they are the same. Case difference doesn't matter. The problem is this: When the program is run it works only half the time. The other half the program doesn't wait for the second string to be entered, … |
|
I cant figure out why this message is popping up. This is a program that is calculates if it is a leap year. [CODE]#include <iostream> using namespace std; int main() { double year, mod4, mod100, mod400; bool leapYear; cout << "Enter a year from 1582 on.\n"; cin >> year; /* … |
|
In my c++ book they give a program that finds the prime numbers between 1 and 100. The problem I am having trouble understanding is the logic of the second for loop. I know what it does but not how, if that makes any sense. [CODE] #include <iostream> using namespace … |