forked from dmit-ssu/example_cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
49 lines (36 loc) · 688 Bytes
/
main.cpp
File metadata and controls
49 lines (36 loc) · 688 Bytes
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
#include <iostream>
#include <string>
using namespace std;
class Student
{
private:
string first_name;
string second_name;
int group;
public:
Student()
{
first_name = "First_name";
second_name = "Second_name";
group = 0;
}
Student(first_name,Second_name,group):first_name(0),second_name(0),group(0)
{
}
void ShowDate()
{
cout << first_name <<" "<< second_name<< " " << group;
}
};
int main(int argc, char *argv[])
{
cout << "Hello, World!\n";
string a,b;
int c;
cin >> a;
cin >> b;
cin >> c;
Student person(a,b,c);
person.ShowDate();
return 0;
}