I got this error in my code I do not know how to figure it out
Cannot convert 'string' to 'char' in function healthClubMaintain::addClient(string)
Code:#include <iostream> using namespace std; class healthClubMaintain{ private: char Al[15]; string classCleintName; int classClientIDNumber; public: void addClient(string); }; void healthClubMaintain::addClient(string clientName){ classCleintName = clientName; Al[0]=classCleintName; cout << Al[0] << endl; } int main(){ int number,loop=0; int clientIDNumber,programNumber,approvalIDNumber,clientIDA,programNumberA; string clientName,programName,approvalName; healthClubMaintain Club; while ( loop==0){ cout<< "Select one of the following option:"<<endl; cout<< "(1) Add a new client to the program"<<endl; cout<< "(2) Display all clients in the program"<<endl; cout<< "(3) Add a new exercise to the program"<<endl; cout<< "(4) Display all exercise to the program"<<endl; cout<< "(5) Add an approval for an exercise for a client"<<endl; cout<< "(6) Display all approval records in the program"<<endl; cout<< "(7) Add a performed record to the program"<<endl; cout<< "(8) Display all preformed records in the program"<<endl; cout<< "(9) Determine for client(s) performance "<<endl; cout<< "(10) Exit the program"<<endl; cin >> number; if ( number ==1 ){ cout << "Insert the client's name" << endl; cin >> clientName; cout << "Insert a new ID" << endl; cin >>clientIDNumber; Club.addClient(clientName); } } }



LinkBack URL
About LinkBacks



