Tôi có đoạn mã sau:tại sao chuỗi không khai báo trong phạm vi
#include <string>
#include <boost/thread/tss.hpp>
static boost::thread_specific_ptr<string> _tssThreadNameSptr;
tôi nhận được lỗi sau
g++ -c -I$BOOST_PATH tssNaming.h
tssNaming.h:7: error: 'string' was not declared in this scope
Nhưng tôi bao gồm chuỗi trong #include
tôi.
thêm std :: trước khi chuỗi – innochenti
trùng lặp có thể xảy ra [C++ lỗi: 'string' vẫn chưa được công bố] (http://stackoverflow.com/questions/2890860/c- error-string-has-not-declaration) – juanchopanza