Beginning of task 5

This commit is contained in:
2019-02-21 14:11:13 +01:00
parent bed4f31d23
commit 72b3728f63
21 changed files with 1792 additions and 50 deletions

View File

@@ -6,7 +6,8 @@ CourseCatalog::CourseCatalog()
void CourseCatalog::addCourse(string code, string name)
{
courses[code] = name;
//courses[code] = name;
courses.emplace(code, name);
}
void CourseCatalog::removeCourse(string code)

View File

@@ -1,26 +1,20 @@
a
b
c
d
e
f
g
sdf
sad
fd
dsf
ds
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
dfh
sd
fh
fd
h
fdg
h
fdgh
df
h
fdh
fdh

View File

@@ -4,6 +4,8 @@
#include "Task3.h"
#include "Task4.h"
int main(){
// Your code here
@@ -13,19 +15,26 @@ int main(){
//countCharInTxt("grunnlov.txt");
/*
CourseCatalog courses = CourseCatalog();
courses.addCourse("TDT4100", "Informasjonsteknologi grunnkurs");
courses.addCourse("TDT4102", "Prosedyre- og objektorientert programmering");
courses.addCourse("TMA4100", "Matematikk 1");
courses.addCourse("TDT4102", "C++");
cout << courses;
courses.addCourse("TDT4103", "C++");
*/
// map.insert funker ikke
cout << courses;
//cout << courses;
vector<Temps> temps;
string file = "temperatures.txt";
@@ -33,6 +42,7 @@ int main(){
cout << temps;
return 0;
}

View File

@@ -1,26 +1,21 @@
1 a
2 b
3 c
4 d
5 e
6 f
7 g
2 d
3 sdf
4 sad
5 fd
6 dsf
7 ds
8 h
9 i
10 j
11 k
12 l
13 m
14 n
15 o
16 p
17 q
18 r
19 s
20 t
21 u
22 v
23 w
24 x
25 y
26 z
9 dfh
10 sd
11 fh
12 fd
13 h
14 fdg
15 h
16 fdgh
17 df
18 h
19 fdh
20 fdh
21