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?
Thank You
Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!
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:
#include <stdio.h>
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.