I have a hard time getting std::u16string
to compile in g++-4.8 or g++-5.1.
I'm using ubuntu 14.04. I keep getting errors like undefined u16string reference
or u16string is not a member of std
.
#include<iostream>
#include<string>
using namespace std;
int main(){
u16string str = u"hello u16string";
return 0;
}
And then compile with g++ -std=c++14 main.cpp
or g++ -std=c++11 main.cpp
update
the above code works fine in g++4.8. i was missing something else.
Aucun commentaire:
Enregistrer un commentaire