-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtrial.cpp
More file actions
33 lines (33 loc) · 847 Bytes
/
trial.cpp
File metadata and controls
33 lines (33 loc) · 847 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<sstream>
//#include<cassert>
//using namespace std;
//int main()
//{
// /*cout<<"C++";
// if(1)
// {
// assert(1);
// }*/
// string date="Independence Day: July 4,1776";
// istringstream istr(date);
// string word1,word2,month;
// int day,year;
// char comma;
// istr>>word1>>word2>>month>>day>>comma>>year;
// cout<<"Contents of string stream istr,one word per line:\n"
// <<word1<<endl<<word2<<endl<<month<<endl<<day<<comma<<endl<<year<<endl<<endl;
// date.append("it's a nice day");
// cout<<date<<endl;
// string moto="live and learn";
// date.insert(2,moto);
// cout<<date<<endl;
// date.erase(3,5);
// cout<<date<<endl;
// date.replace(2,3,moto);
// cout<<date<<endl;
// date.erase(2);
// cout<<date<<endl;
// //date.assign(4,moto);
// //cout<<date<<endl;
//}