Skip to content

Commit 4a7119e

Browse files
committed
Finished chapter 8
1 parent 2ed1748 commit 4a7119e

File tree

14 files changed

+19
-0
lines changed

14 files changed

+19
-0
lines changed

.vs/slnx.sqlite

4 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
 use.cpp
22
C:\Users\PC\Desktop\Nauka C++\Programowanie.-Teoria-i-praktyka-z-wykorzystaniem-Cpp.-Bjarne-Stroustrup\8. Szczegóły techniczne - funkcje itp\Project1\Project1\use.cpp(47,20): warning C4018: '<': signed/unsigned mismatch
33
C:\Users\PC\Desktop\Nauka C++\Programowanie.-Teoria-i-praktyka-z-wykorzystaniem-Cpp.-Bjarne-Stroustrup\8. Szczegóły techniczne - funkcje itp\Project1\Project1\use.cpp(74,22): warning C4018: '<': signed/unsigned mismatch
4+
C:\Users\PC\Desktop\Nauka C++\Programowanie.-Teoria-i-praktyka-z-wykorzystaniem-Cpp.-Bjarne-Stroustrup\8. Szczegóły techniczne - funkcje itp\Project1\Project1\use.cpp(100,20): warning C4018: '<': signed/unsigned mismatch
5+
C:\Users\PC\Desktop\Nauka C++\Programowanie.-Teoria-i-praktyka-z-wykorzystaniem-Cpp.-Bjarne-Stroustrup\8. Szczegóły techniczne - funkcje itp\Project1\Project1\use.cpp(124,20): warning C4018: '<': signed/unsigned mismatch
46
Project1.vcxproj -> C:\Users\PC\Desktop\Nauka C++\Programowanie.-Teoria-i-praktyka-z-wykorzystaniem-Cpp.-Bjarne-Stroustrup\8. Szczegóły techniczne - funkcje itp\Project1\Debug\Project1.exe
Binary file not shown.
Binary file not shown.
Binary file not shown.

8. Szczegóły techniczne - funkcje itp/Project1/Project1/use.cpp

+17
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,16 @@ void ex5(int x, int y, vector<int>& v, int n, int iter_number = 1)
9494
}
9595
}
9696

97+
vector<int> ex6(const vector<string> texts)
98+
{
99+
vector<int> text_size;
100+
for (int i = 0; i < texts.size(); ++i)
101+
{
102+
text_size.push_back(texts[i].length());
103+
}
104+
return text_size;
105+
}
106+
97107
int main()
98108
{
99109
//ex1();
@@ -109,6 +119,13 @@ int main()
109119
//int n = 5; // amount of numbers to display
110120
//ex5(x, y, fibonacci_sequence, n);
111121

122+
vector<string> texts{ "rwaz", "dwa", "trzy", "dfawfdaw" };
123+
vector<int> ex6_output = ex6(texts);
124+
for (int i = 0; i < ex6_output.size(); ++i)
125+
{
126+
cout << ex6_output[i] << endl;
127+
}
128+
112129
// to keep the window open
113130
char cc;
114131
cin >> cc;

0 commit comments

Comments
 (0)