為什么我不能cout string這樣:string text ;text = WordList[i].substr(0,20) ;cout << "String is : " << text << endl ;當(dāng)我這樣做時(shí),出現(xiàn)以下錯(cuò)誤:錯(cuò)誤2錯(cuò)誤C2679:二進(jìn)制'<<':未找到采用'std :: string'類型的右側(cè)操作數(shù)的運(yùn)算符(或沒有可接受的轉(zhuǎn)換)c:\ users \ mollasadra \ documents \ visual studio 2008 \ projects \ barnamec \ barnamec \ barnamec.cpp 67 barnamec **令人驚訝的是,即使這樣也不起作用:string text ;text = "hello" ;cout << "String is : " << text << endl ;
- 3 回答
- 0 關(guān)注
- 461 瀏覽
添加回答
舉報(bào)
0/150
提交
取消