Yes, it did it automatically when I installed linux. Also, I copied a program from CD, but when I
tried to run the sucker it didn't work. The green files. What the hell am I doing wrong?
Printable View
Yes, it did it automatically when I installed linux. Also, I copied a program from CD, but when I
tried to run the sucker it didn't work. The green files. What the hell am I doing wrong?
i always liked the c++ way of doing things
#include <iostream.h>
int main (){
cout>>"Hello world\n";
return 0;}
i haven't tried it in linux so i don't even know if i'm right!
Why the hell is this so complicated?
The question I believe was simple. The answers were many and yet misguiding....
Damn you lamers!
[color=blue]I try to explain how to do a C program and compiler in Linux step by step, I hope that with this you can compile a program in C.
1) First use editor to write the program for example pico
pico hello.c
2) Write the program:
#include<stdio.h>
main ()
{
system("cls");
printf("\nHello world");
}
3) Compile the program:
gcc hello.c -o hello
4) Execute the program
./hello
This is all the steps you have to do I hope you compile your program by and good luck :cool: [color=blue]
Check if all ur library files are in your include folder