-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.cpp
More file actions
55 lines (45 loc) · 1.07 KB
/
example.cpp
File metadata and controls
55 lines (45 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#include <iostream>
#include <string>
typedef int my_type_t;
// Example class with some member variables and functions
class ExampleClass {
int userKurwa;
public:
int publicVar;
private:
float privateVar;
protected:
std::string protectedVar;
public:
ExampleClass() : publicVar(0), privateVar(0.0f), protectedVar("protected") {}
~ExampleClass() {}
void publicFunction(int arg1, float arg2) {}
private:
float privateFunction() { return 0.0f; }
protected:
void protectedFunction() {}
};
// Example struct with some member variables and functions
struct ExampleStruct {
int publicVar;
private:
float privateVar;
protected:
std::string protectedVar;
public:
ExampleStruct() : publicVar(0), privateVar(0.0f), protectedVar("protected") {}
~ExampleStruct() {}
void publicFunction(int arg1, float arg2) {}
private:
float privateFunction() { return 0.0f; }
ExampleStruct aaa;
my_type_t bbbbb;
protected:
void protectedFunction() {}
};
int ccccccc = 0;
int main() {
ExampleClass obj1;
ExampleStruct obj2;
return 0;
}