4

The following code returns 3:

#include <string>

int main() {
    std::string str = "€";
    return str.length();
}

I want it to return 1. It returns 3 because the euro symbol is represented by "\342\202\254". I need it to return 1 to align some text in columns.

0 Answers0