Faculty.ro - acces liber la cunoastere - carti, cursuri, seminarii & student fun
Reclama
Cpp tutorial for C users

This text shows and highlights features and basic principles of C++. It is aimed at experienced C users who wish to learn C++. You will be able to express your code using the richer C++ syntax and you will be able to read some C++ code.

Though the concept is introduced and made usable, this is not a tutorial about Object Oriented Programming. You will still have to learn the spirit of OOP and the details of its implementation in C++, in order to be a true C++ programmer.

  1. A new way to include libraries
  2. // for one-line remarks
  3. Console input and output streams
  4. Variable declarations can be put inside the code without using hooks
  5. Variables can be initialised by a calculation involving other variables
  6. Variables can be declared inside a for loop declaration
  7. Global variables can be accessed even if a local variables have the same name
  8. It is possible to declare a REFERENCE to another variable
  9. Namespaces can be declared
  10. A function can be declared inline
  11. The exception structure has been added
  12. A function can have default parameters
  13. FUNCTION OVERLOAD: several functions can be declared with the same name provided there is a difference in their parameter list
  14. The symbolic operators (+ - * / ...) can be defined for new data types
  15. Different functions for different data types will automatically be generated provided you define a template function
  16. The keywords new and delete are much better to allocate and deallocate memory
  17. You can add METHODS To a class or struct
  18. The CONSTRUCTOR and the DESTRUCTOR can be used to initialise and destroy an instance of a class
  19. Complex classes need the COPY CONSTRUCTOR and an overload of the = operator
  20. The method bodies can be defined below the class definition (and Makefile usage example)
  21. The keyword this is a pointer to the instance a method is acting upon
  22. Arrays of instances can be declared
  23. An example of a complete class declaration
  24. static variables inside a class definition
  25. const variables inside a class definition
  26. A class can be DERIVED from another class
  27. If a method is declared virtual the program will always check the type of the instance that is pointed to and will use the appropriate method.
  28. A class can be derived from more than one base class
  29. Class derivation allows you to write generic methods
  30. ENCAPSULATION: public, protected and private
  31. Brief examples of file I/O
  32. Character arrays can be used like files
  33. An example of formatted output
Download link: Cpp tutorial for C users

Categoria: Informatica
Cuvinte cheie:
Adaugat in: Jul 20, 2011

Vizualizari: 400

Cele mai vizualizate articole din categorie
Scop

Scopul acestui portal este de a oferi gratuit cititorilor literatura stiintifica de calitate. Materiale libere de circulatie: carti, articole, studii de specialitate sunt oferite de catre cadrele didactice din invatamantul superior si preuniveristar, cercetatorii atestati.

Cauta
cuvant:
Autentificare
username:
Password:
Contact Us

Loading...