C ++エラー:coutのあいまいなシンボル



C Error Cout Ambiguous Symbol



Baidu a moment that it is using namespace std commented on the line, is really the case, cout is not an error, but the red line out endl string of red came out, that is not defined, I am very depressed Ah. . Then add one: using std :: endl endl at this time of the disappearance of the red line, but the string or undefined say, before it #include Delete, joined using std :: string red string disappear. . . 

しかし、赤い線のcoutがその前に表示され、#include using namespace stdが表示される理由は何ですか?そして最後にstd :: stringを使用すると、何が問題になりますか?



今日、私は初めてそのような状況に遭遇しました。明らかに私は何をすべきか知っています。

私はファイルの冒頭にいました:



#include'iostream '

名前空間stdを使用する

ステートメント。



ページを閉じて再度開くと、赤い波線のプロンプトが表示されたままになります。

オンラインで答えがあまりにも効果的であることがわかりません。

次に、namespace std句を使用してコメントアウトします。たとえば、エラーが発生した後、コメントを解除します。

間違ってしまった。 。 。うつ病。


ただし、cout cinは赤い木の線、文字列ですが、認識されませんが、今回は次の文を追加しました:using std :: string、put using namespace std remove、ok

理由はよくわかりません。 。 。

—————————————————————————————

以下はスクリーンショットです:(私はクリアなggを正常に構築しました)

また、namespace stdフレーズを使用してコメントアウトします。たとえば、エラーが発生した後、コメントを解除します。

問題はなくなりました。 。 。とても嬉しいです