I'm a beginner.
I'm trying to start of...Now I can't get it going...
I'm using some complier-
How can I test the programs I make? After I use the complier?
Jump to content
Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.Create Account How it Works
Well, let's take command of Lcc-Win32. To start the IDE go to the "Start" button and look for "lcc-win32" in the "Programs" folder. You are ready to write your first program in Lcc-Win32.
The first program
As you surely know, since the times of the first C compiler (and may be earlier) it has been a tradition to write a first program called "Hello world". I wrote it for every compiler I had, and that is what we will do now.
The first step is to create the source code file. Go to the "File" option in the menu and select "New". In the dialog write: "Hello.c" and click "OK".
Now you should be facing a white window entitled "hello.c". Write in it the following text:
void main (void)
printf ("Hello World from LCC-Win32!\n");
Let's save our little program. Go to the "File" and select the "Save".
We are ready to compile the program. Select "Compile hello.c" on the "Compiler" menu (it is the last option) to invoke the compiler. A new window will open in the lower part of the IDE. This is the message window. When the compilation process finishes, it should display "HELLO.exe build successfully". If there was any error it will be displayed here too.
If that happens, on the message window double click the line that displays the error message. This will highlight the "offending" source line. Check if you wrote exactly the same as I did. Remember that C is a "case sensitive" language. This means that for the compiler "printf" and "Printf" are very different things. Correct any mistyping and try again.
Now that you have compiled the program, press [Ctrl]+[F5] keys to run it. Nice, isn't it?
Edited by stu_design, 13 May 2005 - 12:35 PM.
0 members, 0 guests, 0 anonymous users
Community Forum Software by IP.Board
Licensed to: Geeks to Go, Inc.