Question on learning c++

I started trying to Lear c++ about 2 years ago, after about 6 months of that time hoping from tutorial to tutorial I gave up. A a year later and I have started learning again, my only underlying problem is that I have quite a few things I do that are bad practice(using things like system("cls)) and I have many bad habits, all of Which I am determined to rid myself of. After slot of searching I am asking if this tutorial will teach me ground up all the basic and advanced C++ topics without giving me any bad habits or bad design. I also don't understand how to use the debugger nor do I understand how the linked works ect. Where can I learn these vital things also.
closed account (Lv0f92yv)
As far as general programming concepts are concerned, this site has very good documentation (I read through this site to learn the basics of C++).

As for using the debugger, what compiler do you have? The compiler is the tool that actually turns your code into machine language and binary (someone correct me if I'm wrong), an IDE (Integrated Development Environment) consists of a debugger, compiler, and a place to edit your code, usually packed with both advanced and basic features.

I don't know much about the linker specifically, but from what I understand the linker handles the different files that make up your program (includes, headers, etc), and probably some other tasks.
Oh sorry I was not very clear on the debugger part, what I meant was I don't know how to use the IDE
closed account (Lv0f92yv)
Which IDE are you trying to use? I have some experience with MSVC++ (express and an older version), as well as dev-cpp and code::blocks. I don't know much about the 'advanced' features, but I've gotten code to compile with them before.

Eclipse is great for C++ (personally), though a lot of people on these forums seem to like MSVC - and it is a great compiler and has a good debugger.
If you're using an IDE I'm sure it would already come with a linker as well, so you just need to compile the code and it would link the files for you.

Anyways the process of compiling is as follows:

1.) The compiler scans your source code and generates .o or .obj files which is basically the machine language representation of your source code. You can't run them on their own though because sometimes they will depend on other libraries ( .lib or .a ) or other object files (.o or .obj), and that's where the linker comes it.

2.) The linker links all of your .o or.obj and forms your executable file.

That's basically the general flow of compiling. Now if you're not using an IDE, you will have to do that manually by issuing command-line parameters to your compiler.
Topic archived. No new replies allowed.