Beginning with C++

Started by
5 comments, last by Vopisk 18 years, 7 months ago
Some time ago I bought a book that's about programming in C++. Apparently its by the creator of C++ (stroustrup?). I've read a great deal through it, but I don't have the software to program in C++. I tried a free trial program that I downloaded from the internet, but even the code that is an example in the Stroustrup book doesn't work. Although I can understand code pretty well, I'm not confident that I can easily write anything that could show a result. When learning C++ should you be doing the exercises in the book as you go along? And should I buy software to program with (like Visual C++)? How much does this usually cost? -- Scipio3
Advertisement
You don't need to buy a C++ compiler. Microsoft has released Visual C++ .NET 2003 Professional compiler for free as a download (though it lacks the IDE). You can also use MinGW, a gcc port for Windows. For free IDEs you can try Code::Blocks or DevCpp.

And yes, do the exercises in the book as you go along. It helps.
How do you use the software to write programs with? The microsof program just gives a command line. How am I supposed to use this to write programs. The book that I have just talks about the language, it doesn't go into how to use the compiler or whatever it is called.

-- Scipio3
I know it can be confusing at first but it does get better. Try this link out. It should fill in some of the blanks you have right now and will make it easier to understand the book you have. Good luck.

Clicky

SDBradley
CGP
"A person who won't read has no advantage over one who can't read." ~Mark Twain
You also might look into downloading the Visual C++ 2005 Express Edition, which is free.
Quote:Original post by Scipio3
How do you use the software to write programs with? The microsof program just gives a command line. How am I supposed to use this to write programs. The book that I have just talks about the language, it doesn't go into how to use the compiler or whatever it is called.

-- Scipio3


You can use any text editor to write the source code, or an integrated development environment such as Code::Blocks or DevCpp.
Quote:Original post by Anonymous Poster
Quote:Original post by Scipio3
How do you use the software to write programs with? The microsof program just gives a command line. How am I supposed to use this to write programs. The book that I have just talks about the language, it doesn't go into how to use the compiler or whatever it is called.

-- Scipio3


You can use any text editor to write the source code, or an integrated development environment such as Code::Blocks or DevCpp.


Correct, the C++ Source Code is really just a plain text file, so you can write C++ code using Microsoft's Notepad if you really wanted to. However, most people prefer to use special text editors made specifically for coding and/or an integrated IDE (integrated development environment, if I'm not mistaken) which is the text editor built into/on top of the code compiler. The compiler is what takes all of the code and files and whatnot that you've included and turns it into a working program.

I use Bloodshed's Dev-C++ exclusively for my C++ work, but I also have the Scite text editor which allows you to write code in a wide array of languages with syntax highlighting and all the nifty features that make coding that much easier. A quick google search should return either Dev-C++ or Scite, which you can use, and another search should return plenty of tutorials on how to compile a program in C++.

Good luck!

Vopisk

This topic is closed to new replies.

Advertisement