Learning C++ without an IDE

前端 未结 9 691
无人共我
无人共我 2021-02-02 14:14

I\'ve recently started to learn C++ and am completely confused with the choices of IDEs and compilers out there. I am competent with interpreted languages and like the simplicit

相关标签:
9条回答
  • 2021-02-02 14:55

    I am developing on Windows and from what I understand, it seems that there is 'pure' C++ and then C++ that is somehow related to windows, is this Visual C++? I would like to write programs that make use of Windows features but I want to know when I am using windows features and when I am writting code that would work on any platform.

    MS Visual C++ 2008 Express is a free IDE aimed at folks like you, it's available by download from Microsoft, I recommend you try it out.

    0 讨论(0)
  • 2021-02-02 14:58

    I'd say to start out with Visual Studio. This is a great IDE for programming C++ on windows, might as well use it when it can speed up certain things a lot.

    The differences between compilers aren't that huge - if you can write solid code in VS then it shouldn't be a problem to figure out how to get your code working in GCC/G++.

    As for books; Exceptional C++ by Herb Sutter and The C++ Programming Language by Bjarne Stroustrup are a great read.

    Visual Studio is the way to go when developing for Windows.

    0 讨论(0)
  • 2021-02-02 15:00

    If you won't use an IDE, you definitely want to use Makefiles to organize your workflow... and you can make easily from emacs or vim.

    Anyway, may I suggest you to use a very simple, almost non intrusive IDE, that could be great for learning purposes: http://www.bloodshed.net/devcpp.html

    It comes with the MinGW compiler bundled, so it's just install and go.

    0 讨论(0)
  • 2021-02-02 15:01

    Firstly, are there any books or websites that teach C++ from this approach? (IDE-less)

    Yes, definitely. Stroustrup's book has already been mentioned. For learning C++ I'd also recommend two other books: If you like thorough explanations and don't shy away from 1000 pages, look at Lippman et al. If you rather like a short introduction and don't fear a steep learning curve, look at Koenig/Moo. Both are excellent books. (BTW, a good place to look for good books has always been the book review section at the ACCU.)

    As for which tool chain you want to use: If you rather have a standalone editor and invoke the compiler from the command line, you can do this with either GCC or VC. This approach has the advantage that it is more unlikely to lure you into using something proprietary (like C++/CLI). If you would like to try an IDE, VC Express is fine, once you're past setting up a new C++ project. Of course, the number of options you can tweak for a new project can be very overwhelming. But on the other hand you get things like an integrated debugger. Note that there are other integrated solutions, too. The most mature and prominent is probably eclipse.

    Edit: If you don't mind spending a little money, look at Comeau. It's not free, but it's not expensive either and it's usually considered to be the most standard-conforming C++ compiler around and has excellent error messages. (You can test-drive it at the website.) Note that it emits C code, though. That means you have to have another compiler to create an executable program. But both GCC and VC Express will do, so there's no other cost. (Note that using VC you will get Dinkumware's std lib implementation, which is also considered to be a very good one.)

    0 讨论(0)
  • 2021-02-02 15:01

    Visual C++ is the name of the IDE program package. Installing it installs many things including the compiler cl.exe, which can compile, depending on settings, program written in either the C, C++, or C++/CLI programming language (for the .Net framework).

    You can use the compiler on the command prompt without the IDE by (for example) selecting Start > Programs > Microsoft Visual Studio X > Visual Studio Tools > Visual Studio X Command Prompt. This execute a script which sets various environment settings needed to compile programs before giving you the command prompt.

    0 讨论(0)
  • 2021-02-02 15:03

    I actually suggest IDE approach, Microsoft Visual C++ Express Edition should do the trick. Excluding some fancy syntax most C++ compilers behave the same way. C++ is a language that has a very small standard library (covering mostly I/O functions, basic math etc..) this is probably what you refer as pure C++. For something more advanced you'll have to use system libraries.. In example if you want to write windows gui application you'll have to include windows.h header file which is platform specific and exists only on windows compilers..

    0 讨论(0)
提交回复
热议问题