-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmath.cpp
More file actions
33 lines (27 loc) · 703 Bytes
/
Copy pathmath.cpp
File metadata and controls
33 lines (27 loc) · 703 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
#include <iostream>
#include <string>
#include <fstream>
using namespace std;
class inf {
public:
std::string ufirst, ulast, umiddle, uage;
inf(string first, string last, string middle, string age){
ufirst = first;
ulast = last;
umiddle = middle;
uage = age;
}
void parse() {
ofstream file("studentinfo.txt");
if (file.is_open()) {
file << "Name: " << ufirst << "Lastname" << ulast << "MiddleName: " << umiddle << "age: " << uage;
file.close();
} else {
cout << "unable to open file";
}
cout << "\n hello " << ufirst;
}
};
int main(void) {
return 0;
}