Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
1
142GameCenter
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nelson Phillips
142GameCenter
Commits
523a5e90
Commit
523a5e90
authored
Mar 11, 2019
by
Kyle Malaguit
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
autosave
parent
6317fec5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
6 deletions
+8
-6
Testings/SaveLoad/SaveLoad.cpp
Testings/SaveLoad/SaveLoad.cpp
+2
-5
Testings/SaveLoad/main.cpp
Testings/SaveLoad/main.cpp
+1
-1
Testings/SaveLoad/snakedata.txt
Testings/SaveLoad/snakedata.txt
+5
-0
No files found.
Testings/SaveLoad/SaveLoad.cpp
View file @
523a5e90
...
...
@@ -25,8 +25,8 @@ void SaveLoad::displayScores(){
void
SaveLoad
::
userInputNameMakeScore
(
int
intScore
){
char
userNameInput
[
3
];
cout
<<
"Please enter a 3 character user name
\n
"
;
do
{
cout
<<
"Please enter a 3 character user name
\n
"
;
try
{
cin
>>
userNameInput
;
if
(
strlen
(
userNameInput
)
!=
3
){
...
...
@@ -41,10 +41,7 @@ void SaveLoad::userInputNameMakeScore(int intScore){
}
while
(
true
);
Scores
*
scorePtr
=
nullptr
;
scorePtr
=
new
Scores
(
userNameInput
,
intScore
);
pushBackNewScoreAndSort
(
*
scorePtr
);
delete
scorePtr
;
pushBackNewScoreAndSort
(
Scores
(
userNameInput
,
intScore
));
}
\ No newline at end of file
Testings/SaveLoad/main.cpp
View file @
523a5e90
...
...
@@ -29,7 +29,7 @@ int main(){
// second.displayScores();
second
.
userInputNameMakeScore
(
1000
);
second
.
userInputNameMakeScore
(
9999
);
second
.
updateFile
();
second
.
displayScores
();
...
...
Testings/SaveLoad/snakedata.txt
View file @
523a5e90
...
...
@@ -2,10 +2,15 @@ NAME SCORE
nge 654346
vfd 45365
cdn 21474
bbb 9999
vfr 9999
ddd 9999
Kyl 9999
vfd 4636
vev 4536
DVS 3423
goo 1000
vfd 1000
efd 1000
dew 343
bth 34
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