是內部有一種方法來定義std::string
和std::stringstream
內部if
或main
函數作爲參數限定字符串流和字符串如果
例如
main(int d,int m)
{
if(std::cin>>d)
{}
if(std::stringstream ss,std::string s)
{}
}
它給錯誤
expected primary-expression before ‘ss’
error: expected `)' before ‘ss’
這沒有任何意義。你想達到什麼目的? – mch 2009-12-17 06:28:32
只是試圖寫一個沒有分號的代碼 – d3vdpro 2009-12-17 06:30:31
請參閱http://stackoverflow.com/questions/1919574/ - 爲什麼任何人想這樣做是超出了我的。 – 2009-12-17 06:31:13