I am just starting with this c++ program and i started by reading the help sections provided in the package. I worked my way through to the part where they give you a program to try out. A very easy one:
include <stdio.h>
int main()
{
printf("Hello World\n");
return 0;
}
I put it in and saved it as a .c file, compiled it and tried to run it, just like they said to do in the help section. But the problem I'm having is after you hit the run button... Nothing happens, i figured a window would pop up with the 'Hello World' text like the program should do, but the only thing that happened was a very quick pop up black screen. It appears and disappears quickly and thats it. I have yet to see any successful program run, even though the program has no errors.
I was just wondering if there was something i needed to download in order to view the running program.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Your exact question, how do you keep the display window open, and much more, can be found in the thread in this very forum titled 'Please Read Before Posting A Question'
You will also want to check out the section on the 'basic 3'
Wayne
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Imagine an environment where a program's window was not closed by the operating system when the program terminated!? ... A desktop full of 'zombie' windows.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am just starting with this c++ program and i started by reading the help sections provided in the package. I worked my way through to the part where they give you a program to try out. A very easy one:
include <stdio.h>
int main()
{
printf("Hello World\n");
return 0;
}
I put it in and saved it as a .c file, compiled it and tried to run it, just like they said to do in the help section. But the problem I'm having is after you hit the run button... Nothing happens, i figured a window would pop up with the 'Hello World' text like the program should do, but the only thing that happened was a very quick pop up black screen. It appears and disappears quickly and thats it. I have yet to see any successful program run, even though the program has no errors.
I was just wondering if there was something i needed to download in order to view the running program.
Hah !
My desktop's full of zombie windows anyway.
They're called M$ Windows
Your exact question, how do you keep the display window open, and much more, can be found in the thread in this very forum titled 'Please Read Before Posting A Question'
You will also want to check out the section on the 'basic 3'
Wayne
Well, Try giving getch() before the return statement. Like this :
include <stdio.h>
int main()
{
printf("Hello World\n");
getch();
return 0;
}
-Arti
The user input is a means to an end.
You see, the program does what it is supposed to do, and like me, at the
end of the days work, it closes up shop and goes home.
The input is simply a way of telling me, there's one more thing to do,
wait for a phone call (or in the case of the program, and input).
Wayne
Imagine an environment where a program's window was not closed by the operating system when the program terminated!? ... A desktop full of 'zombie' windows.