+ 1
Problem with deque in C++
Hello, i was given this code for an example of deque. However, it shows that left and right are ambigious. Where is the problem, siggestions? Thanks. CODE:https://code.sololearn.com/c2551hPVHy1P/#cpp
1 ответ
+ 1
The <iostream> header contains functions with the same names which are defined within the namespace std, and since you include that whole namespace, they shadow your own definitions.
This is one of the reasons why it is recommended not to include
using namespace std;
in your program, but to import only required methods, e.g.
using std::cout;
using std::cin;
...
or to directly prefix stuff from the STL when calling it, e.g.
std::cout << "Hello World!" << std::endl;