C++ “std::string has not been declared” error

前端 未结 2 346
花落未央
花落未央 2021-01-17 10:22

I\'ve been looking for an answer on websites but couldn\'t find any answer that helped me.

I have a code that uses strings when i tried (like suggested) to add these

2条回答
  •  心在旅途
    2021-01-17 10:52

    The include should come before the using

    #include 
    using namespace std;
    //using std::string; <-- Needless
    

提交回复
热议问题