Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wektor_cpp
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Patryk Czarnik
wektor_cpp
Commits
9cfc078a
Commit
9cfc078a
authored
Apr 28, 2026
by
Patryk Czarnik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implementacja oparta o tablicę stałego rozmiaru
parent
61b446e2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
wektor.cpp
wektor.cpp
+6
-3
wektor.h
wektor.h
+4
-0
No files found.
wektor.cpp
View file @
9cfc078a
...
...
@@ -2,6 +2,7 @@
#include "wektor.h"
Wektor
::
Wektor
()
:
liczba_elementow
{
0
}
{}
Wektor
::~
Wektor
()
{
...
...
@@ -9,13 +10,15 @@ Wektor::~Wektor() {
}
void
Wektor
::
push_back
(
int
e
)
{
t
[
liczba_elementow
]
=
e
;
liczba_elementow
++
;
}
void
Wektor
::
set
(
int
idx
,
int
e
)
{
// FIXME kontrola zakresu
t
[
idx
]
=
e
;
}
int
Wektor
::
get
(
int
idx
)
{
return
13
;
return
t
[
idx
]
;
}
wektor.h
View file @
9cfc078a
...
...
@@ -5,6 +5,10 @@
/** Tablica zmiennej długości zawierająca wartości int. */
class
Wektor
{
int
t
[
10
];
// logiczny rozmiar wektora = ile pozycji w tablicy jest zajętych = indeks pierwszej wolnej pozycji
int
liczba_elementow
;
public
:
Wektor
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment