Question:
call anyone tell me which is best & easiest c , c++ complier , & how to use it?
PRAVIN
2013-09-27 22:27:12 UTC
i tried no. of compliers from online like turbo c, c++ , borland ...none them work ...can anyone give instructions to install , configure , use best & easiest complier for c, c++ ...one more thing what would be the result of this instruction p = printf("printf("hello")") , p is initialize as integer , what would be the result stored in p ?
Six answers:
Fried
2013-09-27 22:29:03 UTC
dev C++ http://www.bloodshed.net/dev/devcpp.html
?
2013-09-29 15:12:25 UTC
Firstly your code is wrong. You're missing a semicolon and you haven't escaped the quotes in your format string. Your complete program should look like:



#include



int main(int ArgCount, char ** ArgVector) {



  signed CharsPrinted = printf("printf(\"hello\")");

}



Where P will now contain the length of the literal string "printf(\"hello\")", which is 16. '\"' is one character.



Here's instructions on how to install the Windows port of GCC.



Are you on Linux, Windows, or Mac, or something else?

If you are on Windows, use MinGW.

If you are on Linux, use GCC.

If you are using an Apple device (Mac), Use whatever compiler comes with XCode.

If you are using something else, try GCC; there WILL be a C compiler available for essentially every platform that's ever seen the light of day.



Obviously you can't compile C with batch.

Assuming you're on windows:

Get MinGW from

http://www.mingw.org/

Follow the instructions- download the installer and execute.

After the GNU license statement on the first screen, there should be an option to add hooks for GUI.

Deselect it. The additional options underneath should become greyed-out. Press continue and wait. It won't take too long; the file is small. Make sure there's no errors and press "Quit" when complete.



Open the CLI and type

%HOMEDRIVE% && CD %HOMEDRIVE%\mingw\bin

MINGW-GET.exe install "gcc=4.8.*"



This will take a bit longer -- wait for it to complete.

Once done type

SET.exe %PATH% %HOMEDRIVE%\mingw\bin



Now type your C code in your favorite text editor- I saved mine to the desktop; a six line:

#include



int main(int ArgCount, char ** ArgVector) {

printf("Hello World: You've just compiled with GCC!");

}



Now back in the CLI, type

CD.exe %USERPROFILE%\Desktop\

GCC.exe %USERPROFILE%\Desktop\test.c -o %USERPROFILE%\Desktop\test.exe && test.exe



Best of luck.



If you happen to be on Linux or on another OS, it's very likely that will follow the same procedure.

However, the CLI is different. Generally I use CYGWIN and a custom shell I've written, but the gist of what you need to do remains the same across platforms.
just "JR"
2013-09-28 21:19:41 UTC
I set up dev c++ from bloodshed. Installed wihout problems, run the examples without problems! Rather intuitive user interface. Remain to learn C++ functions! (chot found any manual yet...)
?
2013-09-28 12:01:08 UTC
[URL=http://cbtsam.com/cppl1/cbtsam-cppl1-011.php]Compile your code on:[/URL]
Chris
2013-09-28 07:46:19 UTC
Check out http://www.codeblocks.org/
green meklar
2013-09-30 00:23:57 UTC
Is GCC not good enough?


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...