| | |
realy fresh to C
![]() |
#include <stdio.h>
int main(void)
{
printf("Hello world!\n");
return 0;
}
can you eplain me all...please
vhen running your file it happens nothing
an@jan-desktop:~$ gcc rep.c
jan@jan-desktop:~$ gcc rep.c
jan@jan-desktop:~$ gcc rep.c
jan@jan-desktop:~$
int main(void)
{
printf("Hello world!\n");
return 0;
}
can you eplain me all...please
vhen running your file it happens nothing
an@jan-desktop:~$ gcc rep.c
jan@jan-desktop:~$ gcc rep.c
jan@jan-desktop:~$ gcc rep.c
jan@jan-desktop:~$
Last edited by jan1024188; Sep 15th, 2006 at 5:36 pm.
gcc only compiles your program into an executable file, it does not run your program. The default name of your program is a.out because you did not tell gcc what to name it. So to run your program, try this:
C Syntax (Toggle Plain Text)
./a.out <Enter key>
Use ls command to search the directory and see if it contains a file called a.out. If not, then gcc probably did not compile it. If it didn't then compare your program with what ~S.O.S.~ posted and make sure it is identical. And from here I think you need to start reading some of the links that were posted in the sticky at the top of this board. I know its a lot of reading, but if you want to learn how to program you must also be willing to do a lot of reading and studying.
yes file is there but i cant open it....im gonna buy this book anyway
http://www.amazon.com/Absolute-Begin...e=UTF8&s=books
http://www.amazon.com/Absolute-Begin...e=UTF8&s=books
•
•
•
•
jan@jan-desktop:~$ ./a.out <Enter key>
bash: syntax error near unexpected token `newline'
C Syntax (Toggle Plain Text)
$ ./a.out
![]() |
Other Threads in the C Forum
- Previous Thread: CString Convert to LPCTSTR
- Next Thread: C programming - need some help
| Thread Tools | Search this Thread |
#include adobe ansi api array asterisks binarysearch changingto char character cm copyimagefile cprogramme creafecopyofanytypeoffileinc createcopyoffile csyntax database directory dynamic execv feet fgets file fork forloop frequency function getlasterror givemetehcodez global grade graphics gtkgcurlcompiling hacking hardware highest histogram i/o include incrementoperators infiniteloop input interest kernel keyboard kilometer license linked linkedlist linux linuxsegmentationfault list locate logical_drives looping loopinsideloop. lowest match matrix meter microsoft motherboard mqqueue mysql number odf opensource owf pattern pdf performance pointer posix probleminc process program programming radix recursion recv repetition research reversing scanf segmentationfault sequential shape socket socketprograming standard string systemcall threads turboc unix user voidmain() wab windows.h windowsapi






