Step 3The Opened Project and Starter Source File
Now, you should notice right away that the editor window to the right has inserted some code for you, as a start. This is nice, but occasionally annoying. The first thing to do is to select the words in the parentheses, 'int argc, char *argv[]', change that all to the one word, 'void'. The words originally in there are for projects you'll see later that use command line parameters, also called switches. For now, the program can start up and ignore these, so we use the data place holder 'void'. In the C language, functions, even the special main function, expect to be told about what data types are needed to start with and what data type they can return, or bring back as an answer. The 'void' just says, 'nothing' to the compiler (yes, well for our purposes here). You can use the yellow diskette symbol to save at any time.
The next screenshot will show the code below also. And here it is folks:
/* In C on a straight C compiler, this is a comment.
It is in block form, running until closed without
anything else necessary to keep it from harm's way.
Anything in between doesn't affect the compiled
program at all. Not even a little!
*/
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
puts("Hello, World!");
system("PAUSE");
return 0;
}
| « Previous Step | Download PDFView All Steps | Next Step » |
![]() |
Add Comment
|






























