Reputation: 11
Every time I run my code, the terminal window closes right away. I have already tried multiple ways to fix it but none of them have worked yet. I aded "getc();" before "return" and it doesn't work anyway. I'm unsure of what to do next.
This is my code:
#include <stdio.h>
int main() {
printf("Hello, World!");
getc();
return 0;
}
Just to add, if it matters, at first I had the problem of "Source file not compiled" and I fixed it by deleting "collect2.exe" on the gcc folder. I'm usure if it has anything to do with this but I wanted to comment it.
I have to use this IDE because of university so please someone help me! I expected it to run smoothly after fixing the old problem I already had with the IDE but a new problem popped up.
Upvotes: 1
Views: 59