FAQ (C++)



    
How long does it take to learn C++? 
There is no right answer to this question, it all depends on yourself. But, everybody also has their own definition of learning. If you want to become a professional developer, maybe 1 or 2 years is sufficient, but if you are really serious about this language, then you can learn it forever. Many developers devote their entire career to C++ and you can be one of them too.

What is C++ used for? 
C++ is focused on large system performance, so it is used in a wide variety of programs and problems where performance is important. Some of the examples are operating systems, game developments, web browsers (for example, Firefox and Chrome), and so on. C++ is widely used as it is a fast and powerful programming language.

What are the differences between C, C++, and C#? 
C is considered the mother of all programming languages. In other words, C is already one of the oldest programming languages. C has fewer built-in functions and libraries than C++ and C#. C also doesn't have classes (doesn't support object-oriented programming). Meanwhile, C# is newer than C++ and is built out of C++. Unlike C++, C# shows you compiler warnings as you write code to help reduce errors. C# is better for mobile and web development, while C++ is known for its performance.

Is C++ worth learning and in demand? 
Yes, it is. Learning C++ can help you to learn other programming languages easier as C++ is well known to have a bit more complicated syntax than other programming languages like Python. C++ is also still widely used nowadays, so it is worth learning it and many developers still use C++ to develop their apps. While C++'s demand rate is not as high as Python's in 2023, but it is still one of the most demanded programming languages. Developers who master C++ also have a high salary.

What is Object Oriented Programming in C++? 
Object Oriented Programming is a programming concept to treats each component as an object with its properties and methods. Classes are the blueprint for making objects. In classes, we can define the properties and the functions that the objects have, so that every object from the same class will have the same behaviour.

What is the Standard Library in C++? 
The C++ Standard Library is the collection of classes and functions which are the core of this language, so when we want to code and access the functions, be sure to include the standard library as the header.

When should I use space, tab or newline in C++? 
It's all up to you as long as it is consistent because, unlike Python, C++ is not space-sensitive. You can use white space or tab to style your code to increase your code readability. Many functions or syntaxes in C++ use curly braces "{ }" to separate one block of code from another block of code, so you don't have to worry too much about this.

What does NaN mean? 
NaN means "not a number", and is used for floating point operations. The result of NaN is obtained by doing an operation that doesn't make sense. For example, dividing by zero, taking the log of zero or a negative number, and so on.