Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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++;

}

}

image text in transcribed

- 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database 101

Authors: Guy Kawasaki

1st Edition

0938151525, 978-0938151524

More Books

Students also viewed these Databases questions

Question

Describe the biopsychosocial approach to individual development.

Answered: 1 week ago

Question

Answered: 1 week ago

Answered: 1 week ago

Question

Understand why customers are loyal to a particular service firm.

Answered: 1 week ago