Having issues with this Program why wont it run? it wont recognize inLab or inMx
plz help
#include <string>
#include <iostream>
using std::cout;
using std::endl; // Get # of Students
using std::cin; // Asle system for arrays (allocate memory) 3 arrays Lab, MX, FX - int* lab = new int[numStudents];x3
using std::string; // Get Scores
// Calculate Grades
// Output Report
// Return Memory
inline int round (float num) { return num + 0.5f; }
int main()
{
// Constants+ 0.5f; }
// Assessment percent of final grade
const float kLabPercent = .70f,
kMXPercent = .15f,
kFXPercent = .15f;
const string kSpacer(" "),
kWelcomeMessage ("\nClassPass - student grade calculator"),
kCountPrompt ("\nPlease enter number of students:"),
kLabPrompt (" Lab score (0-100): "),
kMXPrompt (" MX grade (0-100): "),
kFXPrompt (" FX grade (0-100): "),
kApprovePrompt ("A)ccept, R)e-enter or eX)it:"),
kErrorPrompt ("I don't understand that key."),
kStudent ("Student "),
kStudentGradeReport ("Grade Report -------------"),
kRepStudent ("Student:"),
kRepPoints ("Points:"),
kRepRounded ("Rounded:"),
kRepGrade ("Grade: "),
kGoodbyeMessage ("\nClassPass - is complete");
int numStudents;
cout << kWelcomeMessage ;
cout << kCountPrompt ;
int * lab = new int [numStudents];
int * MX = new int [numStudents];
int * FX = new int [numStudents];
Line 14: Your float calculation is going to get truncated to an int. This is probably okay, but you should get rid of the warning.
Line 64: Missing if keyword
Line 68: Improper use of comma operator. You can't have an implied left side operand.
Line 75: inLab, inMx, inFx were declared at line 49 within the scope of the do/while. They went out of scope at line 72 and are no longer defined at line 75.
PLEASE USE CODE TAGS (the <> formatting button) when posting code.
It makes it easier to read your code and also easier to respond to your post. http://www.cplusplus.com/articles/jEywvCM9/
Hint: You can edit your post, highlight your code and press the <> formatting button.