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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Andreas Blakli
Gruppe44-PROG1003-2022
Commits
112899ef
Commit
112899ef
authored
3 years ago
by
Andreas Blakli
Browse files
Options
Downloads
Patches
Plain Diff
La til:
ryddOppMinne funk() i ruter.cpp og ruter.h.
parent
d4d568aa
Branches
main
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ruter.cpp
+12
-0
12 additions, 0 deletions
ruter.cpp
ruter.h
+1
-0
1 addition, 0 deletions
ruter.h
with
13 additions
and
0 deletions
ruter.cpp
+
12
−
0
View file @
112899ef
...
...
@@ -23,6 +23,7 @@ Ruter::Ruter() {
*/
Ruter
::~
Ruter
()
{
skrivTilFil
();
ryddOppMinne
();
}
/**
...
...
@@ -278,3 +279,14 @@ void Ruter::skrivTilFil() {
fil
<<
"X"
<<
'\n'
;
}
}
/**
* Fjerner rute pekere fra alle ruter map'et.
*
*/
void
Ruter
::
ryddOppMinne
()
{
for
(
auto
it
=
alleRuter
.
begin
();
it
!=
alleRuter
.
end
();)
{
delete
it
->
second
;
it
=
alleRuter
.
erase
(
it
);
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
ruter.h
+
1
−
0
View file @
112899ef
...
...
@@ -39,6 +39,7 @@ class Ruter {
int
lesRute
();
void
lesFraFil
();
void
skrivTilFil
();
void
ryddOppMinne
();
};
#endif //__RUTER_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