Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PA2 2019 Lab
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor 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
Martin Němec
PA2 2019 Lab
Commits
b81def0c
Commit
b81def0c
authored
5 years ago
by
Jan Matoušek
Browse files
Options
Downloads
Patches
Plain Diff
Fix drill string compare, fix missing arguments case, rethink levels.
parent
0885004e
Branches
part2
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
drill/type-drill/src/main.cpp
+11
-6
11 additions, 6 deletions
drill/type-drill/src/main.cpp
with
11 additions
and
6 deletions
drill/type-drill/src/main.cpp
+
11
−
6
View file @
b81def0c
...
...
@@ -33,24 +33,28 @@ int main(int argc, char* argv[]) {
g
.
typeNames
.
add
(
std
::
string
(
""
)
+
c
+
(
char
)(
s
[
0
]
-
0x20
)
+
(
s
+
1
),
1
/
32.0
);
}
}
if
(
argc
>
1
&&
std
::
string
(
argv
[
1
])
==
'1'
)
{
if
(
argc
>
1
&&
std
::
string
(
argv
[
1
])
==
"1"
)
{
g
.
templates
.
add
(
std
::
shared_ptr
<
Template
>
(
new
ConstantAssignmentTemplate
(
0
,
1
,
0
,
2
)),
1.0
);
}
if
(
argc
>
1
&&
std
::
string
(
argv
[
1
])
==
'2'
)
{
else
if
(
argc
>
1
&&
std
::
string
(
argv
[
1
])
==
"2"
)
{
g
.
templates
.
add
(
std
::
shared_ptr
<
Template
>
(
new
ConstantAssignmentTemplate
(
1
,
2
,
1
,
3
,
1
,
3
)),
1.0
);
}
if
(
argc
>
1
&&
std
::
string
(
argv
[
1
])
==
'3'
)
{
else
if
(
argc
>
1
&&
std
::
string
(
argv
[
1
])
==
"3"
)
{
g
.
templates
.
add
(
std
::
shared_ptr
<
Template
>
(
new
ConstantAssignmentTemplate
(
1
,
3
,
1
,
4
1
,
5
,
1
,
5
)),
1.0
);
}
else
{
std
::
cerr
<<
"Missing argument 1, 2 or 3"
<<
std
::
endl
;
return
1
;
}
std
::
cout
<<
"
\x1B
[2J
\x1B
[H"
;
for
(
int
i
=
0
;
i
<
10
;
++
i
)
{
std
::
unique_ptr
<
Problem
>
p
(
g
.
generate
(
g
.
templates
)
->
generateProblem
(
g
));
...
...
@@ -66,4 +70,5 @@ int main(int argc, char* argv[]) {
std
::
cout
<<
"-------------------------------------------------"
<<
std
::
endl
;
std
::
cout
<<
"
\x1B
[2J
\x1B
[H"
;
}
return
0
;
}
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