Questions ..

Hey guys , so I've been reading a book on how c++ was invented , and I want you guys to clear something for me:

1- c++ is called " Object-oriented programming " is because it's made of a bunch of functions and when we put these functions together we get a program ?

2- what are classes ? is the main function considered a class ?

3- what they mean by c++11 and c++03 and stuff like that is what added to c++ ? " the new things " ?

be patient please guys , my English isn't that good that's why I couldn't fully understand what's in the book.

1- c++ is called " Object-oriented programming " is because it's made of a bunch of functions and when we put these functions together we get a program ?


C++ is called object-oriented because it deals with "objects" and not because it is made of a bunch of functions.

2- what are classes ? is the main function considered a class ?


main() function is not a class, it is a special function which is first executed in your program

3- what they mean by c++11 and c++03 and stuff like that is what added to c++ ? " the new things " ?


C++11 is the latest version of c++ programming language, what is added are some new headers( which is for
some advance users ), some new syntax, keywords etc...

http://mindview.net/Books/TICPP/ThinkingInCPP2e.html


usually you will not understand classes and functions deeply until you actually use it, later on you will get what really are they as you learn more.

and wait for some more advance and smarter members' answers, i'm sure they will give a more concrete one
Last edited on
1- c++ is called " Object-oriented programming " is because it's made of a bunch of functions and when we put these functions together we get a program ?

The "Object Oriented" part of C++ is (as @shadow fiend said) due to the fact that C++ has the possibility of using objects to simplify your programming and increase code re-usability. These objects are normally formed from "classes", and creating an instance of the class gives you an object.

Functions are not objects. Functions are simply collections of statements put into one block of code that can be called as much as you like, which helps to increase code re-usability. Basically, one (simplistic) way of thinking about it is that functions are blocks of commands and objects are blocks of functions.

2- what are classes ? is the main function considered a class ?

As I said before, a class is a programming structure that is used to generate objects within your code, and is used to (basically) make your life easier. The "main()" function is not a class, as the "main()" function is simply a collection of commands that are called upon the start of the program.

3- what they mean by c++11 and c++03 and stuff like that is what added to c++ ? " the new things " ?

Basically, C++11 and C++03 are two standards of C++. Originally, C++ was simply a language similar to C that was defined by Bjarne Stroustrup. However, due to different companies adding different things into C++, C++ was eventually standardized into ISO C++98. However, as times move on, more effective programming techniques are discovered, and previously effective techniques die out, so the standard for C++ changes. This allows for more efficient and readable code, through the creation of "new things" into the C++ standard.

Hope this helps you to understand. If you don't get this, don't worry, some of these ideas are fairly advanced and you will understand more as you grow to know C++ better.
Thank you guys ^^

I'm not going to lie , I didn't understand what you guys said :(

but I'm one of those guys that doesn't learn anything unless there's an example of it ^^

Since I'll get a closer look at these things later while learning , then it's going to be ok ^^
Honesty will take you far. If you take a look at the C++ Language Tutorial in Documentation you will find plenty of examples on objects and classes etc. Just be patient and eventually you will understand everything if you just want to.

EDIT: I mean here http://www.cplusplus.com/doc/tutorial/
Last edited on
I think what best is continue on reading , since only 5 pages left , and then I'll start chapter 2.

I'll try to not skip anything even chapter 2 , even though I already learned some basics from my classes , but I may learn something new ^^
Topic archived. No new replies allowed.