1
当我尝试编译下面的代码:basic_string的预期初始编译错误
#include <string.h>
using namespace std;
typedef std::basic_string<char> foostring;
foostring foo = "foo";
我得到以下错误:
stringtest.cpp:5: error: expected initializer before ‘<’ token
stringtest.cpp:6: error: ‘foostring’ does not name a type
我的编译器是:G ++(Ubuntu的4.4.1-4ubuntu9) 4.4.1
我在做什么错?我打算将这个与Windows TCHAR一起用于unicode支持,一旦我找出如何使用它。
作品,谢谢。 – alius 2011-02-16 12:21:13