Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Register
Sign in
Toggle navigation
Menu
Екатерина Чернова
iostream_stl
Commits
25af0e29
Commit
25af0e29
authored
3 years ago
by
Илья Богданов
Browse files
Options
Download
Patches
Plain Diff
Замечания по Storage.h
parent
4b864673
master
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
homework1/Part2/Storage.h
+8
-0
homework1/Part2/Storage.h
with
8 additions
and
0 deletions
+8
-0
homework1/Part2/Storage.h
+
8
−
0
View file @
25af0e29
...
...
@@ -33,6 +33,9 @@ struct Date {
}
Date
operator
+
(
const
Date
&
to_summ
)
{
//!!! Неверная перегрузка: почему изменяется первый операнд? Для этого есть +=
day
+=
to_summ
.
day
;
while
(
day
>=
30
)
{
day
=
day
-
30
;
...
...
@@ -48,6 +51,9 @@ struct Date {
}
Date
operator
+
(
const
int
&
to_summ
)
{
//!!! Неверная перегрузка: почему изменяется первый операнд? Для этого есть +=
day
+=
to_summ
;
while
(
day
>=
30
)
{
day
=
day
-
30
;
...
...
@@ -81,6 +87,8 @@ struct Production {
int
amount_of_products
;
double
unit_price
;
//!!! Среди полей есть массив. Где конструктор копирования и оператор присваивания?
bool
operator
==
(
const
Production
&
prod_to_comp
)
{
return
storage_id
==
prod_to_comp
.
storage_id
&&
product_code
==
prod_to_comp
.
product_code
&&
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
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
Menu
Explore
Projects
Groups
Topics
Snippets