Alx09

Untitled

Feb 5th, 2021
1,001
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.44 KB | None | 0 0
  1. #include <iostream>
  2. #include <list>
  3. #include <iterator>
  4. #include <conio.h>
  5. #include <string>
  6. #include <exception>
  7. #include <fstream>
  8. #define _CRT_SECURE_NO_WARNING
  9. using namespace std;
  10. class a {
  11.     int as;
  12. public:
  13.     a(int b) {
  14.         cout << "constructor detected" << endl;
  15.         as = b;
  16.     }
  17.     a(a &b) {
  18.         cout << "Constructor detected" << endl;
  19.     }
  20.    
  21.    
  22. };
  23. int test(a test) {
  24.     return 2;
  25. }
  26. int main(){
  27.     a b(8);
  28.     test(b);
  29.     return 0;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment