Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What should I learn first before heading to C++? [closed]

I'm learning C, but after that or in the meanwhile, what should I learn first and subsequently before getting into C++ ? Compilers, Data Structures, UML or Design Patterns ?(also when start to learn Win32 API ?) I'm not in a hurry at all, so I can grasp the requirements from the deepest beginning. I just don't want to get lost for being cursory and negligent.

In addition to this, which subjects on mathematics has most impact on coding very well ? Linear Algebra, Discrete Mathematics, Calculus ?

I'll be thankful if someone guides me through this journey. There are many questions I would like to know the answers. Thanks.

like image 478
Daniel Avatar asked Dec 04 '10 07:12

Daniel


2 Answers

First you should learn that C++ is not a superior language. C has its uses as more than a stepping stone into C++. C, and "C-style" C++ are used because they:

  • Generate smaller binaries
  • Use less memory
  • Compile faster
  • Do not require OS-support
  • Are simpler, and easier to implement

Data structures are by far the most useful of the listed to learn, followed by algorithms. If you intend to go into C++, it's also useful (mandatory?) to have good design skills.

You should not necessarily learn Win32 at all. Consider learning the POSIX APIs, GTK+ and Boost, as they're more portable, and work on platforms other than Windows.

The best decision you can make is to learn C thoroughly as a separate skill on a Unix platform, before crutching yourself by not being able to see the difference between C and C++.

Of the listed Mathematics disciplines, I've only used discrete mathematics. Linear algebra is also useful, but by far and away the best discipline for programming is set and number theory.

Enjoy your time in C, don't become dependent on Windows/Visual Studio, and don't rush into C++.

Update0

Almost forgot! You absolutely must use a decent C compiler. A central reason to C++'s wide use in enterprise, and the bad reputation C has among Windows developers is Visual Studio. Visual Studio is easily the best C++ IDE, however it's also the worst C compiler I know of. Be sure to use a C compiler with C99 support, such as GCC, mingw or Clang. My first experience with C was using LCC, which was very easy to use on Windows, but I haven't used it since moving to Linux, so I can't comment on its C99 status.

like image 163
Matt Joiner Avatar answered Oct 23 '22 07:10

Matt Joiner


Compilers, Data Structures, UML or Design Patterns ?

Data Structures and Algorithms.

In addition to this, which subjects on mathematics has most impact on coding very well ? Linear Algebra, Discrete Mathematics, Calculus ?

Discrete Mathematics and Number Theory.

like image 26
Prasoon Saurav Avatar answered Oct 23 '22 08:10

Prasoon Saurav