Reputation: 11
I am new to learning programming. Ive set up MinGW and have added the plugin. I tried running this basic code
#include <stdio.h>
int main(void)
{
puts("Hello, world!");
return 0;
}
but it doesnt seem to return anything. This is what the console log shows
cc -o hello.exe hello.c
gcc -o hello.exe hello.c
Process started (PID=14948) >>>
<<< Process finished (PID=14948). (Exit code 0)
What am i doing wrong?
Upvotes: 1
Views: 90
Reputation: 152
Your code does not return anything because C
is a compiled language, you just compiled it, for it to return something you need to run it.
To run it open the folder where you compiled it and 2 clicks on the file hello.exe
Upvotes: 1