online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
/*************************************************************** * Name: Prof. Orta * Course: Computer Science & Programming * Class: CS04103 Section: 1 & 2 * Assignment Date: 10/18/20 * File Name: Vectors.cpp ***************************************************************** * Purpose: Demonstrate the use of vectors *****************************************************************/ #include <iostream> #include <string> #include <stdlib.h> #include <iomanip> #include <vector> using namespace std; // Function Prototype void collection(vector<string>&, vector<int>&); void output(vector<string>& , vector<int>&); int main () { vector<int> grades; vector<string> names; collection (names, grades); output (names, grades); } void output(vector<string> &names , vector<int> &grades) { system("clear"); for (int x=0 ; x < names.size(); x++) { //cout << "The vector size is: " << names.size(); cout << "******************************************************************************************" << endl; cout << left << setw(20) << "Student Name: " << names[x]<< endl; cout << left << setw(20)<< "Student grade: " << grades[x] << endl ; cout << "******************************************************************************************" << endl << endl; } } void collection(vector<string> &names , vector<int> &grades) { string name; int grade = 0; system("clear"); for (int x=0 ; x<3 ; x++) { cout << "Please enter the student name: "; getline(cin,name); names.push_back(name); cout << "Please enter the student grade: "; cin >> grade; grades.push_back(grade); cin.ignore(); } }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue