|
||||||
| Forums FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| ARCHIVES - Programming & Scripting A place to discuss website design, programming, shell scripts, etc |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
The GCC compiler works fine. In the last program, it showed "warning: no newline at end of file", but the program should work with this warning, right?
Anyway, when I type 'a.out', it doesn't execute, but it says "bash: a.out: command not found". :blink: I need solution for this. Thank you very much. |
|
|||
|
It's a good practice to put a newline character \n at the end of a file. Also, I think you are just entering "gcc programname.c" into the terminal, where programname.c is the name of your program. Try this though...say the name of your program is chess.c, and it's a chess game. Type "gcc -o chess chess.c" into the console instead, and then instead of the executable file being called the generic "a.out," it will be "chess," which is a much more descriptive filename. Then you would run the program by entering "./chess" into the terminal.
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|