This commit is contained in:
邹晓航
2014-12-23 11:23:10 +08:00

View File

@@ -228,14 +228,15 @@ TinySTL
####(7):binary_search_tree<string> ####(7):binary_search_tree<string>
ifstream f; ifstream f;
char buff[256] = { 0 }; //char buff[256] = { 0 };
std::string word; std::string word;
f.open("C:\\Users\\zxh\\Desktop\\text.txt"); f.open("C:\\Users\\zxh\\Desktop\\text.txt");
TinySTL::vector<TinySTL::string> v; TinySTL::vector<TinySTL::string> v;
while (f.good()){ while (f.good()){
f >> word; f >> word;
std::copy(word.begin(), word.end(), buff); //std::copy(word.begin(), word.end(), buff);
v.push_back(TinySTL::string(buff, buff + word.size())); //v.push_back(TinySTL::string(buff, buff + word.size()));
v.push_back(word);
} }
TinySTL::binary_search_tree<TinySTL::string> sbst; TinySTL::binary_search_tree<TinySTL::string> sbst;
ProfilerInstance::start(); ProfilerInstance::start();