Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PPC2025_CT11
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Kazuyuki Omi
PPC2025_CT11
Commits
c33bae66
Commit
c33bae66
authored
5 days ago
by
Kazuyuki Omi
Browse files
Options
Downloads
Patches
Plain Diff
update main
parent
3f72cdfd
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
hw/hw01/HW01.zip
+0
-0
0 additions, 0 deletions
hw/hw01/HW01.zip
hw/hw01/main
+0
-0
0 additions, 0 deletions
hw/hw01/main
hw/hw01/main.cpp
+16
-9
16 additions, 9 deletions
hw/hw01/main.cpp
with
16 additions
and
9 deletions
hw/hw01/HW01.zip
0 → 100644
+
0
−
0
View file @
c33bae66
File added
This diff is collapsed.
Click to expand it.
hw/hw01/main
+
0
−
0
View file @
c33bae66
No preview for this file type
This diff is collapsed.
Click to expand it.
hw/hw01/main.cpp
+
16
−
9
View file @
c33bae66
...
...
@@ -16,13 +16,12 @@ typedef struct setting
int
header
=
-
1
;
std
::
vector
<
std
::
vector
<
int
>>
numbers
;
int
max_size_vector
=
0
;
int
zaloha
=
0
;
}
setting
;
void
get_error_100
(
setting
&
a
)
{
std
::
c
out
<<
"Out of
R
ange"
<<
std
::
endl
;
std
::
c
err
<<
"Out of
r
ange"
<<
std
::
endl
;
exit
(
100
);
}
void
get_error_101
(
setting
&
a
)
...
...
@@ -33,7 +32,7 @@ void get_error_101(setting &a)
void
get_error_102
(
setting
&
a
)
{
std
::
cerr
<<
"Invalid configration"
<<
std
::
endl
;
std
::
cerr
<<
"Invalid config
u
ration"
<<
std
::
endl
;
exit
(
102
);
}
...
...
@@ -46,10 +45,15 @@ void get_error_103(setting &a)
void
get_config
(
setting
&
a
)
{
std
::
string
line
;
bool
is_equal
=
false
;
while
(
std
::
getline
(
std
::
cin
,
line
))
{
if
(
line
==
"="
)
break
;
if
(
line
==
"="
)
{
is_equal
=
true
;
break
;
}
std
::
istringstream
setting_stream
(
line
);
std
::
string
key
;
...
...
@@ -84,7 +88,11 @@ void get_config(setting &a)
setting_stream
>>
a
.
header
;
}
}
}
if
(
!
is_equal
)
{
std
::
cerr
<<
"No input of end symbol '='"
<<
std
::
endl
;
exit
(
105
);
}
}
void
check_num_of_lettersb4
(
setting
&
a
,
const
int
&
value
)
{
...
...
@@ -167,6 +175,7 @@ void print_config(const setting& a)
std
::
cout
<<
"config.stretch="
<<
a
.
stretch
<<
std
::
endl
;
if
(
a
.
header
!=
-
1
)
std
::
cout
<<
"config.header="
<<
a
.
header
<<
std
::
endl
;
std
::
cout
<<
std
::
endl
;
}
void
print_roof
(
setting
&
a
)
...
...
@@ -201,8 +210,6 @@ void print_ABC(setting &a)
print_roof
(
a
);
}
//stretch == 1//一個大きくします。
//それでも中に入りません、ー>#
bool
check_num_of_letters
(
setting
&
a
,
const
int
num
)
{
int
tmp_length
=
std
::
to_string
(
num
).
length
();
...
...
@@ -222,7 +229,7 @@ void print_all_vectors(setting &a)
std
::
cout
<<
"|"
;
std
::
cout
<<
(
a
.
align
==
"left"
?
std
::
left
:
std
::
right
);
for
(
in
t
j
=
0
;
j
<
a
.
max_size_vector
;
j
++
)
for
(
size_
t
j
=
0
;
j
<
static_cast
<
size_t
>
(
a
.
max_size_vector
)
;
j
++
)
{
if
(
j
<
a
.
numbers
[
i
].
size
())
{
...
...
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