toupper not working
Does anybody know what the problem is with toupper? It keeps giving me an error there and I don't know why. It seems like it wants another argument but I don't think that's right. #include <fstream> #include <string> #include <algorithm> using namespace std; //declaration section class Salesperson { public: Salesperson(); void writeRecordToFile(string, int, ofstream &); void readRecordFromFile(ifstream &); string getName(); int getSales(); private: string name; int sales; }; //implementation section Salesperson::Salesperson() { name=""; sales=0; } //end of default constructor void Salesperson::writeRecordToFile(string n, int s, ofstream &outF) { transform(n.begin(), n.end(), n.begin(), toupper()); name=n; sales=s; outF<<name<<'#'<<sales<<endl; }//end of writeRecordToFile function void Salesperson::readRecordFromFile(ifstream &inF) { getline(inF, name, '#'); inF>>sales; inF.ignore(1); }//end of readRecordFromFile function string Salesperson::getName() { return name; }//end of getName function int Salesperson::getSales() { return sales; }//end of getSales function