G

Untitled

public
Guest Oct 21, 2024 Never 11
Clone
C++ paste1.cpp 38 lines (32 loc) | 684 Bytes
1
#include<bits/stdc++.h>
2
3
using namespace std;
4
typedef long long ll;
5
#define sz(s) (int)(s).size()
6
#define all(s) s.begin(),s.end()
7
8
void Speed() {
9
ios_base::sync_with_stdio(false);
10
cin.tie(NULL);
11
}
12
13
struct Node{
14
int x;
15
Node(){
16
cout << "Empty Constructor\n";
17
}
18
Node(int x){
19
cout << "Parameterized Constructor\n";
20
}
21
};
22
23
void solve() {
24
Node a; // Output Empty Constructor
25
Node b(1); // Output Parameterized Constructor
26
a = Node(1); // Output Parameterized Constructor
27
28
}
29
30
int main() {
31
Speed();
32
int tc = 1;
33
//cin >> tc;
34
while (tc--) {
35
solve();
36
}
37
return 0;
38
}