SlideShare a Scribd company logo
Below is my code for C++, I keep getting an error
43 5 C:Program Files (x86)Dev-CppMinGW64libgccx86_64-w64-
mingw324.9.2includec++bitsistream.tcc [Error] 'basic_istream' does not name a type
I had it running perfectly until I messed with the istream.tcc
PLEASE HELP
//This program holds, in an array of string objects, five student names.
//This program also uses an array of five characters to hold five students' letter grades
//and five arrays of four doubles to hold each student's set of test scores.
#include <iostream>
using namespace std;
const int NUM_TESTS = 4; // Number of tests
const int NUM_STUDENTS = 5; // Number of students
double inputValidate(double);
void getStudentTestScores(double[]);
double calculateAverageOfArray(const double[], int);
char getAverageLetterGrade(double);
void getStudentNames(string[]);
void getAllTestScores(const string[],
double[],
double[],
double[],
double[],
double[]);
void calculateAndDisplayAverages(const string[],
const double[],
const double[],
const double[],
const double[],
const double[]);
int main()
{
string studentNames[NUM_STUDENTS];
double student1TestScores[NUM_TESTS];
double student2TestScores[NUM_TESTS];
double student3TestScores[NUM_TESTS];
double student4TestScores[NUM_TESTS];
double student5TestScores[NUM_TESTS];
getStudentNames(studentNames); //User input student names
getAllTestScores(studentNames, //User input student test scores
student1TestScores,
student2TestScores,
student3TestScores,
student4TestScores,
student5TestScores);
calculateAndDisplayAverages(studentNames,
student1TestScores,
student2TestScores,
student3TestScores,
student4TestScores,
student5TestScores);
return 0;
}
void getStudentNames(string studentNames[])
{
cout << "Enter Student Names: " << endl;
for(int i = 0; i < NUM_STUDENTS; i++)
{
cout << "Student " << (i + 1) << " Name: ";
getline(cin, studentNames[i]);
}
}
void getAllTestScores(const string studentNames[],
double student1TestScores[],
double student2TestScores[],
double student3TestScores[],
double student4TestScores[],
double student5TestScores[])
{
cout << "nEnter test scores for " << studentNames[0] << endl;
getStudentTestScores(student1TestScores);
cout << "nEnter test scores for " << studentNames[1] << endl;
getStudentTestScores(student2TestScores);
cout << "nEnter test scores for " << studentNames[2] << endl;
getStudentTestScores(student3TestScores);
cout << "nEnter test scores for " << studentNames[3] << endl;
getStudentTestScores(student4TestScores);
cout << "nEnter test scores for " << studentNames[4] << endl;
getStudentTestScores(student5TestScores);
}
void getStudentTestScores(double array[])
{
for (int i = 0; i < NUM_TESTS; i++)
{
cout << "Test Number" << (i + 1) << ": ";
array[i] = inputValidate(array[i]);
}
}
double inputValidate(double number)
{
while(!(cin >> number) || (number < 0 || number > 100))
{
cout << "Error. A number from 0 - 100 must be entered: ";
cin.clear();
}
return number;
}
void calculateAndDisplayAverages(const string studentNames[],
const double student1TestScores[],
const double student2TestScores[],
const double student3TestScores[],
const double student4TestScores[],
const double student5TestScores[])
{
// Student number 1
double average = calculateAverageOfArray(student1TestScores, NUM_TESTS);
cout << "nAverage test score for " << studentNames[0] << " = " << average << endl;
char average_letter_grade = getAverageLetterGrade(average);
cout << "Letter grade = " << average_letter_grade << endl;
cout << endl;
// Student number 2
average = calculateAverageOfArray(student2TestScores, NUM_TESTS);
cout << "Average test score for " << studentNames[1] << " = " << average << endl;
average_letter_grade = getAverageLetterGrade(average);
cout << "Letter grade = " << average_letter_grade << endl;
cout << endl;
// Student number 3
average = calculateAverageOfArray(student3TestScores, NUM_TESTS);
cout << "Average test score for " << studentNames[2] << " = " << average << endl;
average_letter_grade = getAverageLetterGrade(average);
cout << "Letter grade = " << average_letter_grade << endl;
cout << endl;
// Student number 4
average = calculateAverageOfArray(student4TestScores, NUM_TESTS);
cout << "Average test score for " << studentNames[3] << " = " << average << endl;
average_letter_grade = getAverageLetterGrade(average);
cout << "Letter grade = " << average_letter_grade << endl;
cout << endl;
// Student number 5
average = calculateAverageOfArray(student5TestScores, NUM_TESTS);
cout << "Average test score for " << studentNames[4] << " = " << average << endl;
average_letter_grade = getAverageLetterGrade(average);
cout << "Letter grade = " << average_letter_grade << endl;
cout << endl;
}
double calculateAverageOfArray(const double array[], int ARRAY_SIZE)
{
double sum = 0;
for (int i = 0; i < ARRAY_SIZE; i++)
sum += array[i];
return sum / ARRAY_SIZE;
}
char getAverageLetterGrade(double average)
{
char letter;
if (average <= 100 && average >= 90)
letter = 'A';
else if (average < 90 && average >= 80)
letter = 'B';
else if (average < 80 && average >= 70)
letter = 'C';
else if (average < 70 && average >= 60)
letter = 'D';
else if (average < 60 && average >= 0)
letter = 'F';
return letter;
}
begin{tabular}{l|l|l|l} Line & Col & File & Message  879 & 0 & C:Program Files (x86)Dev-
CppMinGW64Yliblgcclx8... & In file included from C:/Program Files (x86)/Dev-
Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include/c++/istream end{tabular}
Below is my code for C++- I keep getting an error  43    5    C--Progr.pdf

More Related Content

Similar to Below is my code for C++- I keep getting an error 43 5 C--Progr.pdf

ch02-primitive-data-definite-loops.ppt
ch02-primitive-data-definite-loops.pptch02-primitive-data-definite-loops.ppt
ch02-primitive-data-definite-loops.ppt
ghoitsun
 
Chapter 3 Control structures.ppt
Chapter 3 Control structures.pptChapter 3 Control structures.ppt
Chapter 3 Control structures.ppt
RahulBorate10
 
12422, 744 PM Assignment_3localhost8888nbconverthtml.docx
12422, 744 PM Assignment_3localhost8888nbconverthtml.docx12422, 744 PM Assignment_3localhost8888nbconverthtml.docx
12422, 744 PM Assignment_3localhost8888nbconverthtml.docx
robert345678
 
C-Sharp Arithmatic Expression Calculator
C-Sharp Arithmatic Expression CalculatorC-Sharp Arithmatic Expression Calculator
C-Sharp Arithmatic Expression CalculatorNeeraj Kaushik
 
CCE management system
CCE management systemCCE management system
CCE management system
Trish004
 
Lab Assignment #6, part 3 Time ConversionProgram Name lab.docx
Lab Assignment #6, part 3 Time ConversionProgram Name lab.docxLab Assignment #6, part 3 Time ConversionProgram Name lab.docx
Lab Assignment #6, part 3 Time ConversionProgram Name lab.docx
smile790243
 
ISMG 2800 123456789
ISMG 2800 123456789ISMG 2800 123456789
ISMG 2800 123456789
etirf1
 
Classes(or Libraries)#include #include #include #include.docx
Classes(or Libraries)#include #include #include #include.docxClasses(or Libraries)#include #include #include #include.docx
Classes(or Libraries)#include #include #include #include.docx
brownliecarmella
 
Codes on structures
Codes on structuresCodes on structures
Codes on structures
Shakila Mahjabin
 
A Test of Strength
A Test of StrengthA Test of Strength
A Test of Strength
Chris Oldwood
 
Write the code above and the ones below in netbeans IDE 8.13. (Eli.pdf
Write the code above and the ones below in netbeans IDE 8.13. (Eli.pdfWrite the code above and the ones below in netbeans IDE 8.13. (Eli.pdf
Write the code above and the ones below in netbeans IDE 8.13. (Eli.pdf
arihantmum
 
How to write clean tests
How to write clean testsHow to write clean tests
How to write clean tests
Danylenko Max
 
CSNB244 Lab5
CSNB244 Lab5CSNB244 Lab5
CSNB244 Lab5
Muhd Mu'izuddin
 
Complete DB code following the instructions Implement the D.pdf
Complete DB code following the instructions Implement the D.pdfComplete DB code following the instructions Implement the D.pdf
Complete DB code following the instructions Implement the D.pdf
access2future1
 

Similar to Below is my code for C++- I keep getting an error 43 5 C--Progr.pdf (15)

ch02-primitive-data-definite-loops.ppt
ch02-primitive-data-definite-loops.pptch02-primitive-data-definite-loops.ppt
ch02-primitive-data-definite-loops.ppt
 
Chapter 3 Control structures.ppt
Chapter 3 Control structures.pptChapter 3 Control structures.ppt
Chapter 3 Control structures.ppt
 
12422, 744 PM Assignment_3localhost8888nbconverthtml.docx
12422, 744 PM Assignment_3localhost8888nbconverthtml.docx12422, 744 PM Assignment_3localhost8888nbconverthtml.docx
12422, 744 PM Assignment_3localhost8888nbconverthtml.docx
 
C-Sharp Arithmatic Expression Calculator
C-Sharp Arithmatic Expression CalculatorC-Sharp Arithmatic Expression Calculator
C-Sharp Arithmatic Expression Calculator
 
CCE management system
CCE management systemCCE management system
CCE management system
 
Lab Assignment #6, part 3 Time ConversionProgram Name lab.docx
Lab Assignment #6, part 3 Time ConversionProgram Name lab.docxLab Assignment #6, part 3 Time ConversionProgram Name lab.docx
Lab Assignment #6, part 3 Time ConversionProgram Name lab.docx
 
ISMG 2800 123456789
ISMG 2800 123456789ISMG 2800 123456789
ISMG 2800 123456789
 
Classes(or Libraries)#include #include #include #include.docx
Classes(or Libraries)#include #include #include #include.docxClasses(or Libraries)#include #include #include #include.docx
Classes(or Libraries)#include #include #include #include.docx
 
Codes on structures
Codes on structuresCodes on structures
Codes on structures
 
A Test of Strength
A Test of StrengthA Test of Strength
A Test of Strength
 
Write the code above and the ones below in netbeans IDE 8.13. (Eli.pdf
Write the code above and the ones below in netbeans IDE 8.13. (Eli.pdfWrite the code above and the ones below in netbeans IDE 8.13. (Eli.pdf
Write the code above and the ones below in netbeans IDE 8.13. (Eli.pdf
 
How to write clean tests
How to write clean testsHow to write clean tests
How to write clean tests
 
CSNB244 Lab5
CSNB244 Lab5CSNB244 Lab5
CSNB244 Lab5
 
Fp201 unit4
Fp201 unit4Fp201 unit4
Fp201 unit4
 
Complete DB code following the instructions Implement the D.pdf
Complete DB code following the instructions Implement the D.pdfComplete DB code following the instructions Implement the D.pdf
Complete DB code following the instructions Implement the D.pdf
 

More from anilbhagat17

is a ra time an atardarit deviatios of -13 esen-.pdf
is a ra time an atardarit deviatios of -13 esen-.pdfis a ra time an atardarit deviatios of -13 esen-.pdf
is a ra time an atardarit deviatios of -13 esen-.pdf
anilbhagat17
 
Kindly answer the questions Question 1- Each user profile has its own.pdf
Kindly answer the questions  Question 1- Each user profile has its own.pdfKindly answer the questions  Question 1- Each user profile has its own.pdf
Kindly answer the questions Question 1- Each user profile has its own.pdf
anilbhagat17
 
i- Median P-E- i- Arithmetic mean P-S if- Median P-S 1- Arithenctic me.pdf
i- Median P-E- i- Arithmetic mean P-S if- Median P-S 1- Arithenctic me.pdfi- Median P-E- i- Arithmetic mean P-S if- Median P-S 1- Arithenctic me.pdf
i- Median P-E- i- Arithmetic mean P-S if- Median P-S 1- Arithenctic me.pdf
anilbhagat17
 
Fill in the P(X-x) values to give a legitimate probability distributio (1).pdf
Fill in the P(X-x) values to give a legitimate probability distributio (1).pdfFill in the P(X-x) values to give a legitimate probability distributio (1).pdf
Fill in the P(X-x) values to give a legitimate probability distributio (1).pdf
anilbhagat17
 
Assume that adults have I0 scores that are normally distributed with a.pdf
Assume that adults have I0 scores that are normally distributed with a.pdfAssume that adults have I0 scores that are normally distributed with a.pdf
Assume that adults have I0 scores that are normally distributed with a.pdf
anilbhagat17
 
Aadakilerden hangisi DORU bir ifadedir- A- Gelir bir ak deikenidir B-.pdf
Aadakilerden hangisi DORU bir ifadedir- A- Gelir bir ak deikenidir B-.pdfAadakilerden hangisi DORU bir ifadedir- A- Gelir bir ak deikenidir B-.pdf
Aadakilerden hangisi DORU bir ifadedir- A- Gelir bir ak deikenidir B-.pdf
anilbhagat17
 
Although the Fair Credit Reporting Act restricts access to consumer re.pdf
Although the Fair Credit Reporting Act restricts access to consumer re.pdfAlthough the Fair Credit Reporting Act restricts access to consumer re.pdf
Although the Fair Credit Reporting Act restricts access to consumer re.pdf
anilbhagat17
 
Census data for a certain county show that 20- of the adult residents.pdf
Census data for a certain county show that 20- of the adult residents.pdfCensus data for a certain county show that 20- of the adult residents.pdf
Census data for a certain county show that 20- of the adult residents.pdf
anilbhagat17
 
A 55 year old man presented with a persistent cough and a history of s.pdf
A 55 year old man presented with a persistent cough and a history of s.pdfA 55 year old man presented with a persistent cough and a history of s.pdf
A 55 year old man presented with a persistent cough and a history of s.pdf
anilbhagat17
 
4- Write an ARM Assembly Language Program to check if a number stored.pdf
4- Write an ARM Assembly Language Program to check if a number stored.pdf4- Write an ARM Assembly Language Program to check if a number stored.pdf
4- Write an ARM Assembly Language Program to check if a number stored.pdf
anilbhagat17
 
1) What factors determine the equilibrium interest rate in the market.pdf
1) What factors determine the equilibrium interest rate in the market.pdf1) What factors determine the equilibrium interest rate in the market.pdf
1) What factors determine the equilibrium interest rate in the market.pdf
anilbhagat17
 
Which of the following prion diseases may be acquired by eating beef c.pdf
Which of the following prion diseases may be acquired by eating beef c.pdfWhich of the following prion diseases may be acquired by eating beef c.pdf
Which of the following prion diseases may be acquired by eating beef c.pdf
anilbhagat17
 
Ventral Medial Prefrontal Cortex is in the lobe- Primary visual cortex.pdf
Ventral Medial Prefrontal Cortex is in the lobe- Primary visual cortex.pdfVentral Medial Prefrontal Cortex is in the lobe- Primary visual cortex.pdf
Ventral Medial Prefrontal Cortex is in the lobe- Primary visual cortex.pdf
anilbhagat17
 
Topic- Language barriers in hospital care 1- Fishbone diagram needed.pdf
Topic- Language barriers in hospital care   1- Fishbone diagram needed.pdfTopic- Language barriers in hospital care   1- Fishbone diagram needed.pdf
Topic- Language barriers in hospital care 1- Fishbone diagram needed.pdf
anilbhagat17
 
Using the dollar value LIFO retail method to estimate the cost of endi.pdf
Using the dollar value LIFO retail method to estimate the cost of endi.pdfUsing the dollar value LIFO retail method to estimate the cost of endi.pdf
Using the dollar value LIFO retail method to estimate the cost of endi.pdf
anilbhagat17
 
The utility sends a special form of IP packets called packets to the t.pdf
The utility sends a special form of IP packets called packets to the t.pdfThe utility sends a special form of IP packets called packets to the t.pdf
The utility sends a special form of IP packets called packets to the t.pdf
anilbhagat17
 
The random variable x is known to be uniformly distributed between 1-5.pdf
The random variable x is known to be uniformly distributed between 1-5.pdfThe random variable x is known to be uniformly distributed between 1-5.pdf
The random variable x is known to be uniformly distributed between 1-5.pdf
anilbhagat17
 
The Glass-Steagall Act- which was repealed in 1999- prohibited commerc.pdf
The Glass-Steagall Act- which was repealed in 1999- prohibited commerc.pdfThe Glass-Steagall Act- which was repealed in 1999- prohibited commerc.pdf
The Glass-Steagall Act- which was repealed in 1999- prohibited commerc.pdf
anilbhagat17
 
The following information is available for the preparation of the gove.pdf
The following information is available for the preparation of the gove.pdfThe following information is available for the preparation of the gove.pdf
The following information is available for the preparation of the gove.pdf
anilbhagat17
 
Tc1 is a transposable element found in C- elegans- Researchers studyin.pdf
Tc1 is a transposable element found in C- elegans- Researchers studyin.pdfTc1 is a transposable element found in C- elegans- Researchers studyin.pdf
Tc1 is a transposable element found in C- elegans- Researchers studyin.pdf
anilbhagat17
 

More from anilbhagat17 (20)

is a ra time an atardarit deviatios of -13 esen-.pdf
is a ra time an atardarit deviatios of -13 esen-.pdfis a ra time an atardarit deviatios of -13 esen-.pdf
is a ra time an atardarit deviatios of -13 esen-.pdf
 
Kindly answer the questions Question 1- Each user profile has its own.pdf
Kindly answer the questions  Question 1- Each user profile has its own.pdfKindly answer the questions  Question 1- Each user profile has its own.pdf
Kindly answer the questions Question 1- Each user profile has its own.pdf
 
i- Median P-E- i- Arithmetic mean P-S if- Median P-S 1- Arithenctic me.pdf
i- Median P-E- i- Arithmetic mean P-S if- Median P-S 1- Arithenctic me.pdfi- Median P-E- i- Arithmetic mean P-S if- Median P-S 1- Arithenctic me.pdf
i- Median P-E- i- Arithmetic mean P-S if- Median P-S 1- Arithenctic me.pdf
 
Fill in the P(X-x) values to give a legitimate probability distributio (1).pdf
Fill in the P(X-x) values to give a legitimate probability distributio (1).pdfFill in the P(X-x) values to give a legitimate probability distributio (1).pdf
Fill in the P(X-x) values to give a legitimate probability distributio (1).pdf
 
Assume that adults have I0 scores that are normally distributed with a.pdf
Assume that adults have I0 scores that are normally distributed with a.pdfAssume that adults have I0 scores that are normally distributed with a.pdf
Assume that adults have I0 scores that are normally distributed with a.pdf
 
Aadakilerden hangisi DORU bir ifadedir- A- Gelir bir ak deikenidir B-.pdf
Aadakilerden hangisi DORU bir ifadedir- A- Gelir bir ak deikenidir B-.pdfAadakilerden hangisi DORU bir ifadedir- A- Gelir bir ak deikenidir B-.pdf
Aadakilerden hangisi DORU bir ifadedir- A- Gelir bir ak deikenidir B-.pdf
 
Although the Fair Credit Reporting Act restricts access to consumer re.pdf
Although the Fair Credit Reporting Act restricts access to consumer re.pdfAlthough the Fair Credit Reporting Act restricts access to consumer re.pdf
Although the Fair Credit Reporting Act restricts access to consumer re.pdf
 
Census data for a certain county show that 20- of the adult residents.pdf
Census data for a certain county show that 20- of the adult residents.pdfCensus data for a certain county show that 20- of the adult residents.pdf
Census data for a certain county show that 20- of the adult residents.pdf
 
A 55 year old man presented with a persistent cough and a history of s.pdf
A 55 year old man presented with a persistent cough and a history of s.pdfA 55 year old man presented with a persistent cough and a history of s.pdf
A 55 year old man presented with a persistent cough and a history of s.pdf
 
4- Write an ARM Assembly Language Program to check if a number stored.pdf
4- Write an ARM Assembly Language Program to check if a number stored.pdf4- Write an ARM Assembly Language Program to check if a number stored.pdf
4- Write an ARM Assembly Language Program to check if a number stored.pdf
 
1) What factors determine the equilibrium interest rate in the market.pdf
1) What factors determine the equilibrium interest rate in the market.pdf1) What factors determine the equilibrium interest rate in the market.pdf
1) What factors determine the equilibrium interest rate in the market.pdf
 
Which of the following prion diseases may be acquired by eating beef c.pdf
Which of the following prion diseases may be acquired by eating beef c.pdfWhich of the following prion diseases may be acquired by eating beef c.pdf
Which of the following prion diseases may be acquired by eating beef c.pdf
 
Ventral Medial Prefrontal Cortex is in the lobe- Primary visual cortex.pdf
Ventral Medial Prefrontal Cortex is in the lobe- Primary visual cortex.pdfVentral Medial Prefrontal Cortex is in the lobe- Primary visual cortex.pdf
Ventral Medial Prefrontal Cortex is in the lobe- Primary visual cortex.pdf
 
Topic- Language barriers in hospital care 1- Fishbone diagram needed.pdf
Topic- Language barriers in hospital care   1- Fishbone diagram needed.pdfTopic- Language barriers in hospital care   1- Fishbone diagram needed.pdf
Topic- Language barriers in hospital care 1- Fishbone diagram needed.pdf
 
Using the dollar value LIFO retail method to estimate the cost of endi.pdf
Using the dollar value LIFO retail method to estimate the cost of endi.pdfUsing the dollar value LIFO retail method to estimate the cost of endi.pdf
Using the dollar value LIFO retail method to estimate the cost of endi.pdf
 
The utility sends a special form of IP packets called packets to the t.pdf
The utility sends a special form of IP packets called packets to the t.pdfThe utility sends a special form of IP packets called packets to the t.pdf
The utility sends a special form of IP packets called packets to the t.pdf
 
The random variable x is known to be uniformly distributed between 1-5.pdf
The random variable x is known to be uniformly distributed between 1-5.pdfThe random variable x is known to be uniformly distributed between 1-5.pdf
The random variable x is known to be uniformly distributed between 1-5.pdf
 
The Glass-Steagall Act- which was repealed in 1999- prohibited commerc.pdf
The Glass-Steagall Act- which was repealed in 1999- prohibited commerc.pdfThe Glass-Steagall Act- which was repealed in 1999- prohibited commerc.pdf
The Glass-Steagall Act- which was repealed in 1999- prohibited commerc.pdf
 
The following information is available for the preparation of the gove.pdf
The following information is available for the preparation of the gove.pdfThe following information is available for the preparation of the gove.pdf
The following information is available for the preparation of the gove.pdf
 
Tc1 is a transposable element found in C- elegans- Researchers studyin.pdf
Tc1 is a transposable element found in C- elegans- Researchers studyin.pdfTc1 is a transposable element found in C- elegans- Researchers studyin.pdf
Tc1 is a transposable element found in C- elegans- Researchers studyin.pdf
 

Recently uploaded

"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
Wasim Ak
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
TechSoup
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
Mohammed Sikander
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 

Recently uploaded (20)

"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 

Below is my code for C++- I keep getting an error 43 5 C--Progr.pdf

  • 1. Below is my code for C++, I keep getting an error 43 5 C:Program Files (x86)Dev-CppMinGW64libgccx86_64-w64- mingw324.9.2includec++bitsistream.tcc [Error] 'basic_istream' does not name a type I had it running perfectly until I messed with the istream.tcc PLEASE HELP //This program holds, in an array of string objects, five student names. //This program also uses an array of five characters to hold five students' letter grades //and five arrays of four doubles to hold each student's set of test scores. #include <iostream> using namespace std; const int NUM_TESTS = 4; // Number of tests const int NUM_STUDENTS = 5; // Number of students double inputValidate(double); void getStudentTestScores(double[]); double calculateAverageOfArray(const double[], int); char getAverageLetterGrade(double); void getStudentNames(string[]); void getAllTestScores(const string[], double[], double[], double[], double[], double[]); void calculateAndDisplayAverages(const string[],
  • 2. const double[], const double[], const double[], const double[], const double[]); int main() { string studentNames[NUM_STUDENTS]; double student1TestScores[NUM_TESTS]; double student2TestScores[NUM_TESTS]; double student3TestScores[NUM_TESTS]; double student4TestScores[NUM_TESTS]; double student5TestScores[NUM_TESTS]; getStudentNames(studentNames); //User input student names getAllTestScores(studentNames, //User input student test scores student1TestScores, student2TestScores, student3TestScores, student4TestScores, student5TestScores); calculateAndDisplayAverages(studentNames, student1TestScores, student2TestScores,
  • 3. student3TestScores, student4TestScores, student5TestScores); return 0; } void getStudentNames(string studentNames[]) { cout << "Enter Student Names: " << endl; for(int i = 0; i < NUM_STUDENTS; i++) { cout << "Student " << (i + 1) << " Name: "; getline(cin, studentNames[i]); } } void getAllTestScores(const string studentNames[], double student1TestScores[], double student2TestScores[], double student3TestScores[], double student4TestScores[], double student5TestScores[]) { cout << "nEnter test scores for " << studentNames[0] << endl; getStudentTestScores(student1TestScores);
  • 4. cout << "nEnter test scores for " << studentNames[1] << endl; getStudentTestScores(student2TestScores); cout << "nEnter test scores for " << studentNames[2] << endl; getStudentTestScores(student3TestScores); cout << "nEnter test scores for " << studentNames[3] << endl; getStudentTestScores(student4TestScores); cout << "nEnter test scores for " << studentNames[4] << endl; getStudentTestScores(student5TestScores); } void getStudentTestScores(double array[]) { for (int i = 0; i < NUM_TESTS; i++) { cout << "Test Number" << (i + 1) << ": "; array[i] = inputValidate(array[i]); } } double inputValidate(double number) { while(!(cin >> number) || (number < 0 || number > 100)) { cout << "Error. A number from 0 - 100 must be entered: "; cin.clear();
  • 5. } return number; } void calculateAndDisplayAverages(const string studentNames[], const double student1TestScores[], const double student2TestScores[], const double student3TestScores[], const double student4TestScores[], const double student5TestScores[]) { // Student number 1 double average = calculateAverageOfArray(student1TestScores, NUM_TESTS); cout << "nAverage test score for " << studentNames[0] << " = " << average << endl; char average_letter_grade = getAverageLetterGrade(average); cout << "Letter grade = " << average_letter_grade << endl; cout << endl; // Student number 2 average = calculateAverageOfArray(student2TestScores, NUM_TESTS); cout << "Average test score for " << studentNames[1] << " = " << average << endl; average_letter_grade = getAverageLetterGrade(average); cout << "Letter grade = " << average_letter_grade << endl; cout << endl; // Student number 3
  • 6. average = calculateAverageOfArray(student3TestScores, NUM_TESTS); cout << "Average test score for " << studentNames[2] << " = " << average << endl; average_letter_grade = getAverageLetterGrade(average); cout << "Letter grade = " << average_letter_grade << endl; cout << endl; // Student number 4 average = calculateAverageOfArray(student4TestScores, NUM_TESTS); cout << "Average test score for " << studentNames[3] << " = " << average << endl; average_letter_grade = getAverageLetterGrade(average); cout << "Letter grade = " << average_letter_grade << endl; cout << endl; // Student number 5 average = calculateAverageOfArray(student5TestScores, NUM_TESTS); cout << "Average test score for " << studentNames[4] << " = " << average << endl; average_letter_grade = getAverageLetterGrade(average); cout << "Letter grade = " << average_letter_grade << endl; cout << endl; } double calculateAverageOfArray(const double array[], int ARRAY_SIZE) { double sum = 0; for (int i = 0; i < ARRAY_SIZE; i++) sum += array[i];
  • 7. return sum / ARRAY_SIZE; } char getAverageLetterGrade(double average) { char letter; if (average <= 100 && average >= 90) letter = 'A'; else if (average < 90 && average >= 80) letter = 'B'; else if (average < 80 && average >= 70) letter = 'C'; else if (average < 70 && average >= 60) letter = 'D'; else if (average < 60 && average >= 0) letter = 'F'; return letter; } begin{tabular}{l|l|l|l} Line & Col & File & Message 879 & 0 & C:Program Files (x86)Dev- CppMinGW64Yliblgcclx8... & In file included from C:/Program Files (x86)/Dev- Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include/c++/istream end{tabular}