Question:

How do you compile using c++?

by  |  earlier

0 LIKES UnLike

I'm a freshman CmpE student and I wrote my program, but I'm not sure where to type the program and save it. Does it matter if I use Microsoft word? Then, I have to use command prompt to use the compiler. I copied and pasted the compiler and right beside it I pasted the file I wrote with the program and it says the file name, directory name, or volume label syntax is incorrect. Can someone please help? Thanks!

 Tags:

   Report

6 ANSWERS


  1. You can start learning C++ with these video tutorials:

    http://xoax.net/comp/cpp/console/index.p...

    They are perfect for beginners. This one can get you started by showing you how to install a free compiler:

    http://xoax.net/comp/cpp/console/Lesson0...

    Here are some simple games with code downloads that you can use to get some ideas:

    http://xoax.net/comp/cpp/console/Lesson9...

    http://xoax.net/comp/cpp/console/Lesson2...

    http://xoax.net/comp/cpp/console/Lesson2...

    These tutorials can get you started with graphics programming in OpenGL:

    http://xoax.net/comp/cpp/opengl/index.ph...

    You can go through the tutorials and if you have questions on them or anything else in C++, please post to me here:

    http://xoax.net/forum/

    Enjoy!


  2. Dont use word. It inserts hidden tab and end of line characters and that may be you problem.  Open your project and save it as an ascii(plain text file), or copy your code to Notepad and save it.  

    That should work.

    good luck

    Josh

  3. First, I wouldn't use Microsoft Word to edit C++ files, use a plain text editor like Notepad. You can also find more sophisticated editors if you need them.

    As for compiling it's usually not as simple as just typing a command at the command line. You might want to start with an integrated development environment, this makes things a little easier. You could try Dev C++ (http://www.bloodshed.net/c/index.html), or Microsoft Visual C++ Express, both of which are free.


  4. Your not seriuos are you?

    Visual C++ 2008 - to write  your code

    Bloodshed Dev-C++  ---- to compile your code.

  5. sounds like your doing it right. The only thing is that when you save the program, Microsoft saves it as a .doc file and also adds special formatting. The compiler will accept plain text .cpp files. You should really use Notepad and save it as a file type .cpp. For example myProgram.cpp. If you still have problems, just list them.

  6. You can use the turbo c++ program to compile and run your program. You can log on into http://dn.codegear.com/article/21751     to download the program and test it. Hope this helps..

Question Stats

Latest activity: earlier.
This question has 6 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.