Soluții

C++ References

Creating References

A reference variable is a “reference” to an existing variable, and it is created with the & operator:

string food = “Pizza”;  // food variable
string &meal = food;    // reference to food
[mai mult...]

C++ Exceptions

  • When executing C++ code, different errors can occur: coding errors made by the programmer, errors due to wrong input, or other unforeseeable things.
  • When an error occurs, C++ will normally stop and generate an error message. The technical term for this is: C++ will throw an exception.
[mai mult...]