Question: Can you fix my coding..I can not run the program because have 2 errors..here my coding: #include #include using namespace std; //variable int type; static

Can you fix my coding..I can not run the program because have 2 errors..here my coding:

#include #include

using namespace std;

//variable int type; static int f=0; static int i=0; static int j=0;

//Electronic Engineering Department var string fStudentName[50]; string fStudentMatrixNo[50]; string fStudentSession[50]; string fStudentContact[50]; string fStudentCourse[50];

//Computer Engineering Department var string iStudentName[50]; string iStudentMatrixNo[50]; string iStudentSession[50]; string iStudentContact[50]; string iStudentCourse[50];

//Diploma Studies Department var string jStudentName[50]; string jStudentMatrixNo[50]; string jStudentSession[50]; string jStudentContact[50]; string jStudentCourse[50];

char hasProceed; char mainmenu='y';

//file object ofstream myFile1("Electronic.txt"); ofstream myFile2("Computer.txt"); ofstream myFile3("Diploma.txt");

void ElectronicEngineeringDepartment(); void ComputerEngineeringDepartment(); void DiplomaStudiesDepartment();

//function

int main() { //mainMenu(); while (mainmenu == 'y') { cout > type; cin.ignore(); switch (type) { case 1: ElectronicEngineeringDepartment(); break; case 2: ComputerEngineeringDepartment(); break; case 3: DiplomaStudiesDepartment(); break; default: cout

void ElectronicEngineeringDepartment(){ //code while (f >fStudentName[f]; cout >fStudentMatrixNo[f]; cout >fStudentSession[f]; cout >> "Enter your Contact:"; getline(cin, fStudentContact[f]); //cin>>fStudentContact[f]; cout >> "Enter your Course:"; getline(cin, fStudentCourse[f]); //cin>>fstudentCourse[f]; cout

cout > mainmenu; cout

{ //code while (i >iStudentName[i]; cout >iStudentMatrixNo[i]; cout >iStudentSession[i]; cout >> "Enter your Contact:"; getline(cin, iStudentContact[i]); //cin>>fStudentContact[i]; cout >> "Enter your Course:"; getline(cin, iStudentCourse[i]); //cin>>istudentCourse[i]; cout

cout >mainmenu; } i++; break; } }

void ComputerEngineeringDepartment() { //code while (j >jStudentName[j]; cout >jStudentMatrixNo[j]; cout >jStudentSession[j]; cout>jStudentContact[j]; cout >istudentCourse[j]; cout

cout >mainmenu; break; j++;

}

}

Can you fix my coding..I can not run the program because have

- O H. Structure Problems: Current File 25 Project Errors 2 E.main.cpp C:\Users\user\CLion Projects\untitled32 25 problems Declaration of variable 'type' with deduced type 'auto' requires an initializer :60 Function definition is not allowed here:87 A Global variable 'type' is never used :7 A Global variable "hasProceed' is never used:38 A Clang-Tidy: Initialization of 'myFile1' with static storage duration may throw an exception that cannot be caught:42 A Clang-Tidy: Initializing non-local variable with non-const expression depending on uninitialized non-local variable 'out' :42 A Clang-Tidy: Initialization of 'myFile2' with static storage duration may throw an exception that cannot be caught :43 A Clang-Tidy: Initializing non-local variable with non-const expression depending on uninitialized non-local variable 'out' :43 A Clang-Tidy: Initialization of 'myFile3" with static storage duration may throw an exception that cannot be caught :44 A Clang-Tidy: Initializing non-local variable with non-const expression depending on uninitialized non-local variable 'out":44 A Function 'ElectronicEngineering Department' is never used :87 E TODO Problems 2 Terminal A CMake Python Packages Messages O Build failed in 11 sec, 908 ms (37 minutes ago) Favorites Event Log 51:1 LF UTF-8 4 spaces C++: untitled32 Debug 2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!