PewterTA
04-19-2009, 05:22 PM
Im trying to convert a string to upper case using this code:
for(int i=0 ; i < ArraySize ; i++)
{
DB[i].name = toupper(DB[i].name);
}
And Im getting this error:
error C2664: 'toupper' : cannot convert parameter 1 from 'std::string' to 'int'
DB[i].name is part of an array of structs and stored in it is a name just like it suggests.
Why am I getting this error, I was under the impression that toupper() could convert an entire string not just one char.
Thanks
for(int i=0 ; i < ArraySize ; i++)
{
DB[i].name = toupper(DB[i].name);
}
And Im getting this error:
error C2664: 'toupper' : cannot convert parameter 1 from 'std::string' to 'int'
DB[i].name is part of an array of structs and stored in it is a name just like it suggests.
Why am I getting this error, I was under the impression that toupper() could convert an entire string not just one char.
Thanks