Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TDIU20
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cpp-programmering
TDIU20
Commits
9892f41a
Commit
9892f41a
authored
1 year ago
by
Alrik Appelfeldt
Browse files
Options
Downloads
Patches
Plain Diff
klar h fil för redovisning
parent
07a1ff45
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
list/linked_list.h
+55
-0
55 additions, 0 deletions
list/linked_list.h
with
55 additions
and
0 deletions
list/linked_list.h
0 → 100644
+
55
−
0
View file @
9892f41a
#ifndef LINKED_LIST_H
#define LINKED_LIST_H
#include
<iostream>
#include
<initializer_list>
#include
<string>
#include
<sstream>
#include
<iostream>
#include
<iomanip>
using
namespace
std
;
class
List
{
public:
List
();
List
(
std
::
initializer_list
<
int
>
const
&
list
);
List
(
List
const
&
rhs
);
List
(
List
&&
rhs
);
~
List
();
int
at
(
int
const
&
i
)
const
;
void
remove
(
int
const
&
pos
);
int
get_size
()
const
;
void
Insert_Node
(
int
insert_value
);
bool
List_Is_Empty
();
List
&
operator
=
(
List
const
&
rhs
);
List
&
operator
=
(
List
&&
rhs
);
class
Node
{
public:
int
value
;
Node
*
next
{
nullptr
};
Node
*
previous
{
nullptr
};
Node
(
int
insert_value
);
};
Node
*
head
{
nullptr
};
Node
*
tail
{
nullptr
};
int
list_size
{};
void
printlist
();
int
get_size
();
};
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
List
const
&
rhs
);
#endif
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