User Tools

Site Tools


cpp:function_try_blocks

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
cpp:function_try_blocks [2019/05/15 08:28] – [Exception που συμβαίνουν στον κατασκευαστή της προγόνου κλάσης] gthanoscpp:function_try_blocks [2022/05/23 06:04] – [Function Try Blocks] gthanos
Line 32: Line 32:
  
 Name& Name::operator=(const Name& a) { Name& Name::operator=(const Name& a) {
 +  cout << "--- Operator= ---\n";
   if(name != nullptr)    if(name != nullptr) 
     free(name);     free(name);
Line 84: Line 85:
  
 Εάν μεταγλωττίσουμε και εκτελέσουμε την παρακάτω συνάρτηση //main// ο κώδικας εκτυπώνει τα εξής: Εάν μεταγλωττίσουμε και εκτελέσουμε την παρακάτω συνάρτηση //main// ο κώδικας εκτυπώνει τα εξής:
-<code cpp main.cpp>+<code cpp CreatePerson.cpp>
 #include <iostream> #include <iostream>
 using namespace std; using namespace std;
Line 142: Line 143:
 Name constructor: John Name constructor: John
 Name constructor: Snow Name constructor: Snow
 +--- Operator= ---
 Name destructor: Snow Name destructor: Snow
 Name destructor: Snow Name destructor: Snow
cpp/function_try_blocks.txt · Last modified: 2022/05/23 06:05 by gthanos