Hi guys, I just started learning C++ and I wrote my first program but when I execute it none of my cout statements appear and all I get is a message saying "press any key to continue"
Here is my code:
//
// Program to convert temperature from Celsius degree
// units into Fahrenheit degree units:
// Fahrenheit = Celsius * (212 - 32)/100 + 32
//
#include <cstdio>
#include <cstdlib>
#include <iostream>
using namespace std;
int main(int nNumberofArgs, char* pszArgs[])
{
int celsius;
cout <<"enter the temp in celsius:";
cin >> celsius;
int factor;
factor = 212 - 32;
int fahrenheit;
fahrenheit = factor * celsius/100 + 32;
cout << "the fahrenheit value is:";
cout << fahrenheit << endl;
This sounds like an issue I have with Code::Blocks from time to time. Delete the executable and see if compiling again recreates it. It may be compiling to another directory.
Actually Dev-C++ would not have downloaded the latest Mingw, so although it may not be an issue now it could cause problems in the future. Here's an up date: http://wxdsgn.sourceforge.net/