what is array of void and why am I getting it in the following program? I finally have the first part done where I can loop the input. However, I cannot figure out what this array of void is. I'm getting "declaration of 'lastname' as array of void" in lines 50-55 and 65-71. Also getting std::string Tom[4] previously declared here in line 60 and a redeclaration of std::string Tom[4] in line 63. Any thoughts?
#include <iostream>
#include <istream>
#include <iomanip>
#include <string>
using namespace std;
int namesort (void);
int main()
{
int i = 0;
string studentInfo[7][7];
char inputDone = 'y';
int stopLoop = 0;
do{
cout << "Please Input student's last name : ";
cin >> studentInfo[i][0];
cout << "Please Input student's first name : ";
cin >> studentInfo[i][1];
cout << "Please Input student's ID Number : ";
cin >> studentInfo[i][2];
cout << "Please Input student's Test 1 Grade : ";
cin >> studentInfo[i][3];
cout << "Please Input student's Test 2 Grade : ";
cin >> studentInfo[i][4];
cout << "Please Input student's Test 3 Grade : ";
cin >> studentInfo[i][5];
cout << "Are there anymore student grades to enter? (y/n)";
cin >> inputDone;
} while (inputDone = 'y');
//Last Name string arrays
{
string Ant [4];
string Doe [4];
string Mix [4];
string Nerd [5];
string Sunday [7];
string Thumb [6];
void (*ptr) [] = { Ant, Doe, Mix, Nerd, Sunday, Thumb };
void lastname [0] = Ant;
void lastname [1] = Doe;
void lastname [2] = Mix;
void lastname [3] = Nerd;
void lastname [4] = Sunday;
void lastname [5] = Thumb;
//First name strings
string Adam [5];
string Jane [5];
string Tom [4];
string Bobby [6];
string Billy [6];
string Tom [4];
void firstname [] = { Adam, Jane, Tom, Bobby, Billy, Tom };
void firstname [0] = Adam;
void firstname [1] = Jane;
void firstname [2] = Tom;
void firstname [3] = Bobby;
void firstname [4] = Billy;
void firstname [5] = Tom;
}
system ("pause");
return 0;
}
Also trying to get this to bubble sort alphabetically by last name, but haven't quite made it that far as I really don't know what needs to be done to do a string bubble sort. Third problem: what is a parallel array? I have to put letters and numbers into a table and I'm really lost on what to do there too.