if (inFile >> Temp.id >> Temp.firstName >> Temp.lastName)
{
outFile << tolower(string Temp.lastName) << ','
<< Temp.firstName << endl;
cout << "ID# " << Temp.id;
return true;
}
else
{
return false;
}
}
This is C++. Temp.lastName and Temp.firstName are in Caps. How do I make it so it formats it so the first letter of the first and last name are caps and the rest arent?
Question
aitf311
bool getName(ifstream& inFile, ofstream& outFile)
{
customer Temp;
if (inFile >> Temp.id >> Temp.firstName >> Temp.lastName)
{
outFile << tolower(string Temp.lastName) << ','
<< Temp.firstName << endl;
cout << "ID# " << Temp.id;
return true;
}
else
{
return false;
}
}
This is C++. Temp.lastName and Temp.firstName are in Caps. How do I make it so it formats it so the first letter of the first and last name are caps and the rest arent?
Edited by aitf311Link to comment
Share on other sites
8 answers to this question
Recommended Posts