Ankoctoaragon
Member
hello, I'm learning C++, and recently I have been making some testing programs(very simple things just to test what I've learned, about 15 strings per program)
but every experienced programmer knows that when we are learnig, we should pratice making programs that are made to work in the prompt, but when I compile the program and execute it, the prompt window shows up and instantly it dissapear, I need to see the program to confirm if I've done everything right (I think it's because the system not the code).
I'm using Windows XP, and Dev-C++ as my editor. I'll post the most simple code that cause what I said above.
#include <iostream>
using namespace std;
int main()
{
int length, width, area;
length = 7;
width = 5;
area = length * width;
cout << "A area é ";
cout << area;
return 0;
}
please if there is no way to fix that problem in the system, can you show me a way to avoid this in the code?note that this happens only with programs made to work with prompt.
but every experienced programmer knows that when we are learnig, we should pratice making programs that are made to work in the prompt, but when I compile the program and execute it, the prompt window shows up and instantly it dissapear, I need to see the program to confirm if I've done everything right (I think it's because the system not the code).
I'm using Windows XP, and Dev-C++ as my editor. I'll post the most simple code that cause what I said above.
#include <iostream>
using namespace std;
int main()
{
int length, width, area;
length = 7;
width = 5;
area = length * width;
cout << "A area é ";
cout << area;
return 0;
}
please if there is no way to fix that problem in the system, can you show me a way to avoid this in the code?note that this happens only with programs made to work with prompt.
Last edited: