Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
Gruppe04
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Frederik Simonsen
Gruppe04
Commits
5fd5935c
Commit
5fd5935c
authored
Mar 24, 2022
by
Sondre Sand
Browse files
Options
Downloads
Patches
Plain Diff
små endringer
parent
e626bbe2
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
Stoppesteder.dta
+11
-0
11 additions, 0 deletions
Stoppesteder.dta
stoppested.cpp
+12
-0
12 additions, 0 deletions
stoppested.cpp
stoppested.h
+5
-1
5 additions, 1 deletion
stoppested.h
stoppesteder.cpp
+24
-10
24 additions, 10 deletions
stoppesteder.cpp
with
52 additions
and
11 deletions
Stoppesteder.dta
0 → 100644
+
11
−
0
View file @
5fd5935c
10
aa
bb
cc
dd
ff
ee
gg
hh
ii
jj
\ No newline at end of file
This diff is collapsed.
Click to expand it.
stoppested.cpp
+
12
−
0
View file @
5fd5935c
...
...
@@ -7,6 +7,7 @@
#include
<iomanip>
#include
<iostream>
#include
<string>
#include
<fstream>
#include
<vector>
#include
"stoppested.h"
using
namespace
std
;
...
...
@@ -22,6 +23,17 @@ Stoppested::Stoppested(const string nvn) {
navn
=
nvn
;
}
/**
* Constructor for å lese data dra fil
*
* @param - samme som index for å vite hva som leses inn
*/
Stoppested
::
Stoppested
(
std
::
string
nvn
,
ifstream
&
inn
)
{
navn
=
nvn
;
}
/**
* Returnerer et Stoppesteds unike navn
*
...
...
This diff is collapsed.
Click to expand it.
stoppested.h
+
5
−
1
View file @
5fd5935c
...
...
@@ -9,6 +9,7 @@
#include
<string>
#include
<vector>
#include
<fstream>
/**
* Stoppested (med navn, oversikt over alle nabostopp og
...
...
@@ -21,9 +22,12 @@ class Stoppested {
std
::
vector
<
int
>
tidtilnabo
;
public:
Stoppested
();
Stoppested
(
std
::
string
nvn
,
std
::
ifstream
&
inn
);
Stoppested
(
const
std
::
string
nvn
);
std
::
string
hentStoppestedNavn
();
void
skrivData
();
void
lesData
();
};
#endif
\ No newline at end of file
This diff is collapsed.
Click to expand it.
stoppesteder.cpp
+
24
−
10
View file @
5fd5935c
...
...
@@ -7,6 +7,7 @@
#include
<iomanip>
#include
<iostream>
#include
<vector>
#include
<fstream>
#include
"LesData3.h"
#include
"stoppested.h"
#include
"stoppesteder.h"
...
...
@@ -62,7 +63,20 @@ void Stoppesteder::handling() {
* Leser inn informasjon om stoppesteder fra fil
*/
void
Stoppesteder
::
lesFraFil
()
{
ifstream
innfilS
(
"Stoppesteder.dta"
);
string
navn
;
int
antStopp
;
if
(
innfilS
)
{
innfilS
>>
antStopp
;
innfilS
.
ignore
();
getline
(
innfilS
,
navn
);
while
(
!
innfilS
.
eof
())
{
stopper
.
push_back
(
new
Stoppested
(
navn
,
innfilS
));
getline
(
innfilS
,
navn
);
}
cout
<<
"test"
;
innfilS
.
close
();
}
}
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment