C++ note after my first experience

I have learned C, C#, Jave. I learn them by my intuition, not by reading bible books. So, maybe a little faulty. Anyway, here is my experience after using C++ with Irrlicht.

1. #include “” is different from #include <>

Quoted form : preprocessor to look for include files in the same directory of the file that contains the #include statement, and then in the directories of any files that include (#include) that file. The preprocessor then searches along the path specified by the /I compiler option, then along paths specified by the INCLUDE environment variable.

Angle-bracket form : preprocessor to search for include files first along the path specified by the /I compiler option, then, when compiling from the command line, along the path specified by the INCLUDE environment variable.

2. namespace, class definitions need ‘;’ after {}

3. keyword private: and public: to seperate two kinds of variables and methods, instead of these keyword in front of each variable and method. I remember this is C convention, am I right?

4. define class in .h and the implemention in .cpp. define only method prototype in class, implementation in .cpp later.

5. class->staticMethod and instance.instanceMethod. or pointer->method, instance.method.

These is what I notice its difference from C# and Java. C++ is a difficult but powerful language. learning and using C++ is funny.

Advertisements

2 thoughts on “C++ note after my first experience

  1. Hi! There are some good “bible books” available. I was glad to have bought one of them (The C++ Programming Language, Special Edition, by Bjarne Stroustrup). Also, I’m thinking about checking out Herb Sutter’s “Exceptional C++” books. Good books about C++ are much better than 99% of the C++ tutorials you can find on the net (mostly written by mediocre programmers). I think especially for C++ it really matters because it’s more complex than other languages.

    Cheers!
    – P

  2. I agree that C++ is a complex language and just using online tutorials is far from enough. and I think I can get many C++ bible books pretty easily. I thought that I have come across “Exceptional C++” someway in the office.
    I will start from this one. Thank you Pizer.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s