gcc - C beginner - Hello World program not doing anything on Windows from command prompt -


I am going to start learning C (I need to do some program in C, to convert it to MIP later for).

I am on Windows 8, and downloaded Minzid and set the path variable in my directory so that we can work on GCC or G ++ command prompt.

I have copied the following namaskar one. Example of the world in a C text file.

  Add # & lt; Stdio.h & gt; Int main (zero) {// This is a comment printf ("Hello World! \ N"); Return 0; }   

However, although I am in the correct directory as the file, at the command prompt, when I type "gcc helloWorld.c", it stops for a few seconds, and Then 'Nothing works just as the program has ended and allows me to write something else.

This is likely to be a simple mistake - I really do not understand what I'm doing. But can someone help me?

When you issue the GCC command, you are actually compiling the source code, not the program The compiling process creates the executable file that you can run.

For example, Premiere Poster:

GCC-O Hello World Hollow World C

-o parameter executable file [O] The name of the output is called "helloworld.exe" (as you are using Windows). This should create a new file helloworld.exe, now you can run that file.

Should be a little more read on general programming and compilation.

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -