-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstringame.cpp
More file actions
60 lines (38 loc) · 736 Bytes
/
stringame.cpp
File metadata and controls
60 lines (38 loc) · 736 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
50
51
52
53
54
55
56
57
#include <iostream>
using namespace std;
void ChangeStr(string& st);
int main()
{
/*bool condition(true);
int count = 0;
int a = 1;
int b = 20;
do {
a++;
b++;
cout << " This is current a " << a << endl;
cout << " This is current b " << b << endl;
if (a >= 100)
{
condition = false;
}
} while (condition);
for (int i=0; i < 10; i++)
{
cout << i << endl;
}
string myStr = "Druid";
cout << myStr << endl;
string& myRef = myStr;
cout << myRef << myStr << endl;
myRef += " Mechanics";
cout << myRef << myStr << endl;*/
string myStr = "Druid";
ChangeStr(myStr);
cout << myStr << endl;
ChangeStr("Druid");
}
void ChangeStr(string& st)
{
st += '!';
}