Upon debugging i had thought i did it right. But it was only the first member as the first element in the vector that was corrected.
while ( !inFile->eof() )
{
getline( *inFile, str1, ',' );
sStruct.str1 = str1;
getline( *inFile, str2, ',' );
sStruct.str2 = str2;
getline( *inFile, str3, ',' );
sStruct.str3 = atof( str3.c_str() );
getline( *inFile, str4 );
sStruct.str4 = atof( str4.c_str() );
myLength = sStruct.str1.length();
for( ; sIndex < myLength; sIndex++ )
{
if ( 97 <= str4[sIndex] && str4[sIndex] <= 122 )
{
str4[sIndex] -= 32;
}
}
sStruct.str1 = str1;
vectorData->push_back( sStruct );
}
Implementing this code under the method that i chose to read the file in, only changes the first struct member, in this case str1, to all upper case characters. All characters remain uneffected for the same structure member, str1.
What is my loop not doing?