Learning C++
Since I’ve been wanting to do this for a long time, I’m reading a C++ tutorial. While I have an idea of programming in C++, I have never really sat down to learn all the basics. In reading the tutorial, I’ve noticed that in C++ there are 10 ways to do everything. My favorite examples are:
int a (5) is the same as int a = 5
a = 2 + (b = 5); is the same as
b = 5;
a = 2 + b;
I think that this is one of the reasons C++ code is always so much harder for me to read than Java. I personally think that Java’s syntax seems more consistant, but they do have their inconsistancies also. For example:
word.length(); //Checks the size of the String word.
array.length; //Checks the size of array.
arrayList.size(); //Checks the size of the ArrayList arrayList.
4 Comments