error C2679: binary ‘<<' : no operator found which takes a right-hand operand of type 'std::string' (or there is no acceptable conversion)

You forgot to #include <string> using std::string without including it’s header works on some compilers that indirectly import parts of <string> into their <iostream> or other headers but that’s not standard and shouldn’t be relied upon. Also they often break when you try to output a string since they only included a part of the … Read more

Identifier is undefined

From the update 2 and after narrowing down the problem scope, we can easily find that there is a brace missing at the end of the function addWord. The compiler will never explicitly identify such a syntax error. instead, it will assume that the missing function definition located in some other object file. The linker will … Read more

The #include exists, but I get an error: identifier “cout” is undefined. Why?

You need to specify the std:: namespace: Alternatively, you can use a using directive: I should add that you should avoid these using directives in headers, since code including these will also have the symbols brought into the global namespace. Restrict using directives to small scopes, for example Here, the using directive only applies to the scope of foo().

SDL2.DLL missing

I’m following this tutorial to setup the SDL template but when I try and run the program I get the following error. I have gone over the tutorial several times but cannot see what mistake I am making. I copied the SDL2.DLL into the Release Directory and then ran it and I got a different error. but I imagine that I … Read more