hello, im very beginner at C++ and whit about 1 week studying i managed to make a calculator
i got visual C++ express 2010.
i made my calculator but it haves 1 iusse: it closes instantly when it shows the result.
it was the same iusse my "hello world" had, and used the same solution: std::cin.ignore( std::numeric_limits<std::streamsize>::max(), '\n' );
but it doesnt seem to be working, lemme put the calculator's script just in case:
//calculator, made whit Visual c++ express
//by: Jike AKA César.
//this program is a calculator, DUH
#include <iostream>
#include <math.h>
int FirstNumber;
int SecondNumber;
int main()
{
std::cout << "Welcome to Jike's Calculator Alpha 1.0\nThis is a work in progress so dont except so much from this :3\n";
std::cout << "What is your first number?";
std::cin >> FirstNumber;
std::cout << "What is your second number?";
std::cin >> SecondNumber;
std::cout << "The result is:\n";
std::cout << FirstNumber + SecondNumber;
std::cout << "\n";
std::cout << "Press ENTER to continue...\n";
std::cin.ignore( std::numeric_limits<std::streamsize>::max(), '\n' );
return 0;
}