How to reverse an std::string? [duplicate]

Im trying to figure out how to reverse the string temp when I have the string read in binary numbers

istream& operator >>(istream& dat1d, binary& b1)    
{              
    string temp; 

    dat1d >> temp;    
}

Leave a Comment