forked from grantrostig/cpp_by_example
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathcpp_static_example.hpp
More file actions
23 lines (20 loc) · 709 Bytes
/
cpp_static_example.hpp
File metadata and controls
23 lines (20 loc) · 709 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// totally not done yet!! :)
#pragma once
#include <bits/stdc++.h>
using namespace std;
struct Row {
int my_int {99};
string my_string {"NULL"};
};
class Cpp_static_example {
// using std::vector:: ;
static int counter_private_static;
static std::vector< Row > row_static_data_member; // init not allowed for static data
public:
static int inta_public_static;
int intb_public_instance_var {};
string my_string {};
Row row_instance_var {};
Cpp_static_example() = default;
Cpp_static_example( int ); // init not allowed for static data
};