2020年12月23日星期三

C++ "incomplete type is not allowed" when using stringstream [closed]

I have the following C++ code

#include <iostream>    int main()  {      std::string sText = "These are words in my string!";      std::string sWord;      std::stringstream ss(sText);  }  

And it works fine on Fedora with g++. However, running it on Windows with Visual Studio (so I guess clang) gets incomplete type is not allowed. Is this an error with my code, or is there some difference between compilers? Note: I've tried std::stringstream ss << sText; but that gets the same exact error.

https://stackoverflow.com/questions/65432713/c-incomplete-type-is-not-allowed-when-using-stringstream December 24, 2020 at 08:53AM

没有评论:

发表评论