help
hey guys,
e i have only recently installed red hat 8.0 and i tried 2 run a c program on it it compiles fine but doenst show any o/p i did the following logged on as root it shows [root@localuser...]# and then i did vi new.c wrote the program did esc :wq to come out snd tired to exec it i did # gcc new.c -o new i also tried #gcc new.c the program complies but when i type #./a.out or#./new it doesnt show me any o/p could u pls help me i would really be grateful thanx |
the only thing I can think of is permissions do you know what they are set to for that file?
|
what permissions r u talking about i logged on as root
and just created the file so wat permissions??? |
if you type ls -l in that directory it will list the file permissions
basically i was wondering if the file was allowed to execute on your machine. |
can you paste your program here?
|
its a simple hello world program
#include<stdio.h> main() { printf("hello world"); } there we go thats it now can u help me out?? |
Ok.
put the "\n" at the end of the line. like this. printf("hello world\n"); |
hi again,
this is what the ls- l o/p shows me rwxr-xr-x 1 root root 11352 Feb 15 14:53 new |
Have you put "\n"?
|
hey moe,
thankx a lot man.the /n thing really worked,but could u tell me why do i need to actually enter \n i mean it should work without it shouldnt it?? anyways i have another problem nowmi downloaded xine vcd player(xine-ui-0.9.18cvs-030215.i586.rpm) and also curl-7.10.3-1.i386.rpm installed it on red hat8.0 and when i type xine in the console it opens up but after a few minutes my m/c logs out and got to the text logon screen and then the gui screen does anyone know why this happens??? |
m4yb3 u shuld g0 b4ck 2 w1nd0wz
|
Quote:
But in windows, it is not the case I think. |
Quote:
:) |
All times are GMT -5. The time now is 11:53 PM. |