I CANT FIGURE OUT HOW TO COMPILE CODE
i got the gnu compilier
but i dont' understand it
its just a bunch of bin and script files
i dnot' get it!!!!
how do i run the program
how does it work?!!??!?!?
thanks
-ytaipsw
I CANT FIGURE OUT HOW TO COMPILE CODE
i got the gnu compilier
but i dont' understand it
its just a bunch of bin and script files
i dnot' get it!!!!
how do i run the program
how does it work?!!??!?!?
thanks
-ytaipsw
Download Dev-C++. Command line compilers can be confusing for people that don't have experience. Dev-C++ lets you compile from the IDE, so it's as easy as writing the code and clicking the compile button. You'll have a much easier time. Just make sure you compile as a .c not a .cpp.
Sent from my iPadŽ
Favorite Quote:
>For that reason someone invented C++.
BLASPHEMY! Begone from my C board, you foul lover of objects, before the gods of C cast you into the void as punishment for your weakness! There is no penance for saying such things in my presence. You are henceforth excommunicated. Never return to this house, filthy heretic!
ok i opened it up and this is what i got
http://www.freewebs.com/ytaipsw/myerror.bmp
how do i fix this ><><><><><><
-ytaipsw
compile program using following command
To compile c program
gcc <filename> -o <output_filename>
To compile c++ program
g++ <filename> -o <output_filename>
run it by
./<output_filename>
i did the compile code in CMD.EXE
and it sayed:
'gcc' is not recognised as an internal or external command, operable program or batch file
I am using the MinGW application, so if you are not then please disregard the following.
I don't know whether you have done this or not but, go into the control panel and click on the 'system' icon--then click on the "advanced" tab when the system properties tab appears. Now go and click on the "environmental variables" tab near the bottom and put the correct path (to your GCC compiler folder) in the "path" in the system variables window.
I can't remember the exact string you put into the path, as I did this on my machine in the office. But I found the instructions on the web fairly easily. I will search a bit and edit this post if I find them. But in the meantime maybe someone will chime in with the proper string.
TB
[edit]
You have to add the MinGW\bin sub-directory to the system path. So just edit the path statement I mentioned above to include the phrase ;MinGW\bin (if you installed to the default directory, i.e.; C:\MinGW).
[/edit]
Last edited by TCB; 04-10-2006 at 04:08 PM.
well dude,u said u've gnu compiler but didn't mentioned you are working in windows
Anyways if this is the case go to that directory where u've installed gnu c compiler & run same command.
Or else goto
control panel->system->advanced tab->Environmanet variable
in that window in system variable section you will see path variable,edit that & append path of ur gnu c compiler folder there
that should solve your problem
Last edited by vinit; 04-10-2006 at 10:19 PM.
As said before, if you're a beginner, get something like Dev-C++. It's easier to work with. When you've got the basics down you can start playing with makefiles and compiling manually.
Code:#include <stdio.h> void J(char*a){int f,i=0,c='1';for(;a[i]!='0';++i)if(i==81){ puts(a);return;}for(;c<='9';++c){for(f=0;f<9;++f)if(a[i-i%27+i%9 /3*3+f/3*9+f%3]==c||a[i%9+f*9]==c||a[i-i%9+f]==c)goto e;a[i]=c;J(a);a[i] ='0';e:;}}int main(int c,char**v){int t=0;if(c>1){for(;v[1][ t];++t);if(t==81){J(v[1]);return 0;}}puts("sudoku [0-9]{81}");return 1;}
hey yt,
i found the compiler a bit confusing when i originally started programming too, so don't worry you'll get it.
i'm surprised no one has pointed you to this page:
http://www.cprogramming.com/compilers.html
which has a lot of good info about compilers, what they do and how they work.
this page:
http://faq.cprogramming.com/cgi-bin/...&id=1043284351
helped me the most in setting up the borland compiler with a simple IDE. i recommend you read that page and follow the steps. everything is right there.
thanks for all the help
ok now i think i screwed somethin up
i am using DevC++ thingy
i went into my path and input this
http://www.freewebs.com/ytaipsw/problems.bmp
but i deleted what was there before
if i can't fix this i'll try out borland
-ytaipsw
Last edited by ytaipsw; 04-11-2006 at 03:46 PM.