This one in mind boggling, I started with a much more complex program that was solving systems of non-linear equations and kept simplifying my code because I noticed it wasn't coming up with the right answer. I've simplified it until I have the following and found out... my program can't even add two numbers together! No wonder my equation solver wasn't working. No matter the numbers it just keeps outputting the extremely large number 1974705532. I just can't seem to figure out why and what's going on here.
This is the end code (doesn't get any simpler that this, folks):
#include <iostream.h>
int main() {
int a,b,c;
c = a+b;
cin >> a >> b;
cout << "c is " << c;
system("PAUSE");
return 0;
}
I'm hoping maybe someone has experienced some similarly odd behavior before because I'm at a loss here.
It may have happened to you programming on a Dev-C++ 4.9.9.2 build on a Windows 7 64-bit computer perhaps?