Quote:
Originally Posted by 357mag
Programming is complex stuff, and I'm just a beginner. I'm going to have lots of questions and I don't think I'm asking too much to have my questions answered respectfully and courteously. If you can't do that, then don't answer.
|
With all due respect chap your question did not require two seperate threads, and if you would read fully the replies given on both threads, there have been a few good responses that answer your question. We appreciate that everyone has to begin somewhere. But you have to appreciate that we give this help out of the kindness of our good souls, and when week by week we get new beginners asking the same questions, not reading the forum rules and spamming with new threads, It get kinda tedious. A simple forum search for the term "cin.get" brings up 3 pages of similar related threads.
Also by the fact that you havent indented your code nor put it in code tags makes it a nightmare for us to read, making it harder for us to help you. And can be seen disrespectful by some of the fellow forum members that you won't take the extra time to help us, help you.
#include "stdafx.h"
#include "iostream"
#include <cstdio>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
int integer1, integer2, sum;
cout << "Enter first integer\n";
cin >> integer1;
cout << "Enter second integer\n";
cin >> integer2;
sum = integer1 + integer2;
cout << "The sum is " << sum << endl;
fflush(stdin);
cin.get();
return 0;
}
There much better, and if you look closely at the code you may see a little brucey bonus
sorry for the rant. its not a dig. just hoping I can put it into perspective why some of us come off as sarcastic jerks.