Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
Gruppe44-PROG1003-2022
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
Andreas Blakli
Gruppe44-PROG1003-2022
Commits
2a35a2f0
Commit
2a35a2f0
authored
3 years ago
by
Andreas Blakli
Browse files
Options
Downloads
Patches
Plain Diff
La til:
lesData() func. skrivData() func. i bane.cpp og la til deklarasjoner i bane.h.
parent
08f03e5c
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
bane.cpp
+14
-1
14 additions, 1 deletion
bane.cpp
bane.h
+6
-0
6 additions, 0 deletions
bane.h
with
20 additions
and
1 deletion
bane.cpp
+
14
−
1
View file @
2a35a2f0
#include
"bane.h"
Bane
::
Bane
()
{
using
namespace
std
;
Bane
::
Bane
()
:
Rute
()
{
}
Bane
::~
Bane
()
{
}
void
Bane
::
lesData
()
{
antallVogner
=
lesInt
(
"Antall vogner"
,
MAX_ANTALL_VOGNER
,
MIN_ANTALL_VOGNER
);
baneLengde
=
lesInt
(
"Banelengde"
,
MIN_BANELENGDE
,
MAX_BANELENGDE
);
}
void
Bane
::
skrivData
()
{
cout
<<
"
\n
Antall vogner: "
<<
antallVogner
<<
'\n'
<<
"Banelengde: "
<<
baneLengde
;
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
bane.h
+
6
−
0
View file @
2a35a2f0
#ifndef __BANE_H
#define __BANE_H
#include
<iostream>
#include
"rute.h"
#include
"konstanter.h"
#include
"lesData3.h"
class
Bane
:
public
Rute
{
private:
...
...
@@ -11,6 +15,8 @@ class Bane : public Rute {
public:
Bane
();
virtual
~
Bane
();
void
lesData
();
void
skrivData
();
};
#endif // __BANE_H
\ No newline at end of file
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