cout is not a member of std

add #include <iostream> to the start of io.cpp too.


If you're using pre-compiled headers with Microsoft's compiler (MSVC), remember that it must be:

#include "stdafx.h"
#include <iostream>

and not the other way around:

#include <iostream>
#include "stdafx.h"

In other words, the pre-compiled header include file must always come first. (The compiler should give you an error specifically explaining this if you forget.)


I had a similar issue and it turned out that i had to add an extra entry in cmake to include the files.

Since i was also using the zmq library I had to add this to the included libraries as well.

Tags:

C++

Io

Cout

Member

Std