+ 5
Can i compile a c++ program using the command prompt like in java without an ide?
7 Respuestas
+ 13
Yes. If, for example you have the gnu compiler (and if you are in linux you may have it).
what you have to do is:
g++ sorce_file.cpp
the executable will have the name 'a'
+ 4
the question has been updated.
can I run a c++ program using the command prompt without an ide ?
please answer this question again since I updated it
+ 4
@chris if you mean "run a c++ program without compiling it" the answer is No. It's only possible with interpreted languages. But if you are just asking about running compiled program (I don't think it's the case...) than it's easier with c++ than with java, 'cause you have executable file after compiling c++ code and you can just run it, and you have file with byte-code *.class after "compiling" java code (*.java) which must be run in JVM so you have to run java (jvm) and pass it your byte-code. But still you don't need an IDE to compile any c++ or java code, you just need a compiler javac (java compiler), gcc (gnu c compiler), c++ or other (there are some but not too many alternatives).
+ 4
@Martin Taylor is the bcc32 the name of the compiler?
+ 4
thanks martin you deserve to be mark as best answer
+ 3
yes you can
+ 2
Yes. The exact command line and available arguments depend on the compiler.