-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Cout is ambigous" error when using namespace std #9471
Comments
Thanks for reporting this. I've reproed the issue. It doesn't repro with VS. It could be some difference in how we're updating IntelliSense after an edit. |
Same bug appeared |
FYI, this issue doesn't seem related to the new issue with 1.16.2, because this issue requires very particular edits. We're tracking the new/regression issue with #11122 . |
@tpkowastaken Installing the extension pack is not expected to change the behavior (the bug might repro after making an edit in main). We plan to release a fix in 1.16.3 in the next hour or so. |
Yes, the new 1.16.2 issue is fixed with 1.16.3 (but FYI the original issue is a different bug that still exists, but is harder to repro). |
I have similar error, not with std::cout and in proprietary code, so for obvious reasons I can't show a screenshot with an error message that a variable defined few lines above in the same anonymous namespace is ambiguous. |
@jakublATopera 1.19.9 has a bug in which missing include errors won't be shown if C_Cpp.errorSquiggles is set to "enabled" (#12134) -- if you change that setting to the default value you may see the cause of the cause is a header that isn't being found. Also, it might be worth seeing if the repro still occurs with 1.18.5. |
Hi! I seem to be having a similar issue for the first time as of 05/15/2024. I'm being told that cin is ambiguous, but cout is fine. C/C++ extension version 1.20.5 Included headers are: #include <iostream>
#include <string>
#include <fstream>
#include <regex>
#include <vector>
#include <map>
#include <cctype>
using namespace std; |
Environment
Bug Summary and Steps to Reproduce
"Cout is ambigous" error when using namespace std
when programming in c++ while there is a code including this:
then there is a chance that there appears to be "cout is ambigous error" in problems tab even though there is no error to be found whatsoever. It appears for every "cout" in the file. if you write std:: before the cout the error gets removed.
Steps to reproduce:
i will include my code on which it does bug out but it wasn't an issue only on this code:
Note: if you restart vs code or wait long enough (4minutes) and then edit - it mostly disapears.
Other Extensions
I have tested this with only c++ extension v1.10.7 running and C++ extension pack v1.2.0 running.
Additional Information
I have faced this issue on a low-tier laptop which might be a bit slower than usual. Make sure to replicate on lower-end hardware
My specs:
CPU: Intel(R) Core(TM) i7-4702MQ CPU @ 2.20GHz
Memory: 16GB
A screenshot of this happening:
The text was updated successfully, but these errors were encountered: