I got my code ready and I want to run it , but not from putty or something can edit it,
I want to use my code like .exe file. Could any1 tell me how to do it? dont know the formal word for it.
I got my code ready and I want to run it , but not from putty or something can edit it,
I want to use my code like .exe file. Could any1 tell me how to do it? dont know the formal word for it.
Is "putty" an editor?
Does it not come with a compiler?
Check the user's manuals for it... you may find you already have an executable but just don't know it.
Ehh.. so you want to "build" your code into an executable?
If you have a nice IDE that should probably be able to do it for you, if not you can always use a makefile.
1. Get rid of gets(). Never ever ever use it again. Replace it with fgets() and use that instead.
2. Get rid of void main and replace it with int main(void) and return 0 at the end of the function.
3. Get rid of conio.h and other antiquated DOS crap headers.
4. Don't cast the return value of malloc, even if you always always always make sure that stdlib.h is included.
I think he is referring to Putty the SSH client:
PuTTY: a free telnet/ssh client
He is probably working remotely or something and can't figure out how to create an executable on the remote machine.
1. Get rid of gets(). Never ever ever use it again. Replace it with fgets() and use that instead.
2. Get rid of void main and replace it with int main(void) and return 0 at the end of the function.
3. Get rid of conio.h and other antiquated DOS crap headers.
4. Don't cast the return value of malloc, even if you always always always make sure that stdlib.h is included.
Ok, so clearly you are working remotely and using an editor (emacs) on the remote school server to edit your code there. What compiler do you use to compile your code?
1. Get rid of gets(). Never ever ever use it again. Replace it with fgets() and use that instead.
2. Get rid of void main and replace it with int main(void) and return 0 at the end of the function.
3. Get rid of conio.h and other antiquated DOS crap headers.
4. Don't cast the return value of malloc, even if you always always always make sure that stdlib.h is included.
everytime i compile we type
gcc -Wall
I dont know if its gcc or not
Ok, so if you have a single source file for your whole program then just do:
gcc -Wall <sourcefile> -o <file_to_run>
e.g.
gcc -Wall program.c -o program
Then type ./program to run it.
1. Get rid of gets(). Never ever ever use it again. Replace it with fgets() and use that instead.
2. Get rid of void main and replace it with int main(void) and return 0 at the end of the function.
3. Get rid of conio.h and other antiquated DOS crap headers.
4. Don't cast the return value of malloc, even if you always always always make sure that stdlib.h is included.
I think the OP wants a windows executable file. Well, the technical term is "compiling", look for a good windows compiler for C online. Maybe people here can suggest a free compiler.
If you need a compiler for Windows just use the Pelles C that has been suggested or minGW.
1. Get rid of gets(). Never ever ever use it again. Replace it with fgets() and use that instead.
2. Get rid of void main and replace it with int main(void) and return 0 at the end of the function.
3. Get rid of conio.h and other antiquated DOS crap headers.
4. Don't cast the return value of malloc, even if you always always always make sure that stdlib.h is included.
i want a program using c
to calculate the age of given date of birth.
please solve my problem
1) Please solve your own problem, this is not a homework delivery service.
2) Please use your own separate thread for questions
3) Please read the Homework FAQ
4) Please make an attempt to your problem and post that before asking for help. We will not do your homework for you but we can help along with various issues.
1. Get rid of gets(). Never ever ever use it again. Replace it with fgets() and use that instead.
2. Get rid of void main and replace it with int main(void) and return 0 at the end of the function.
3. Get rid of conio.h and other antiquated DOS crap headers.
4. Don't cast the return value of malloc, even if you always always always make sure that stdlib.h is included.
to calculate te age of given date of birth