template< typename T >
T Read( const char* Section, const char* Key )
{
SecureZeroMemory( m_Result, sizeof( m_Result ) );
GetPrivateProfileString( Section, Key, 0, m_Result, sizeof( m_Result ), m_File.FullPath );
std::istringstream Cast( m_Result );
T Result{ };
Cast >> std::noskipws >> Result;
return Result;
}
m_Result is a member variable of my class. ( char[256] ).
Objective: Try to return all types that i insert on template arg.
Issue: When i send std::string with: "Example Text Return" it returns me "Example" instead of "Example Text Return".
Where is the error? I tried a lot of skipws or noskipws or ws...
Sorry for the english, i'm a brazilian guy.