Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
C
cptr142_group_project
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
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
Jared Sexton
cptr142_group_project
Commits
fbd65371
Commit
fbd65371
authored
Mar 09, 2018
by
Jared Sexton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updating save practices for students in main
parent
baa2da88
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
MAIN.cpp
MAIN.cpp
+6
-2
Teacher.h
Teacher.h
+0
-2
No files found.
MAIN.cpp
View file @
fbd65371
...
...
@@ -23,6 +23,7 @@ int main() {
cin
>>
currentUser
;
if
(
cin
)
{
if
(
currentUser
==
teacher
.
getExitCode
())
{
keepRunning
=
false
;
}
else
if
(
currentUser
==
teacher
.
getUserName
())
{
...
...
@@ -35,14 +36,17 @@ int main() {
}
else
if
(
teacher
.
checkRoster
(
currentUser
)
>=
0
)
{
int
currentUserIndex
=
teacher
.
checkRoster
(
currentUser
);
// Make new student object and copy all their info from teacher vector
Student
currentStudent
;
currentStudent
=
teacher
.
getStudent
(
currentUserIndex
);
// Current user (Student object) : currentStudent
// Current user (Student object) is currentStudent
// save any changes back into teacher vector
teacher
.
setStudent
(
currentStudent
);
// save any changes to the file.
teacher
.
saveProgress
();
}
else
{
cin
.
clear
();
...
...
Teacher.h
View file @
fbd65371
...
...
@@ -40,8 +40,6 @@ class Teacher {
void
setUserName
(
string
userNameIn
);
void
setStudent
(
Student
studentIn
);
// I think it's safe to say that studentIn will be a student in the vector; so the function will find where the student goes in the vector by itself
// vector<Student> roster;
private:
bool
teacherMenuActive
=
1
;
string
userName
;
...
...
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