cout is not a member of std
Solution 1:
add #include <iostream>
to the start of io.cpp
too.
Solution 2:
Also remember that it must be:
#include "stdafx.h"
#include <iostream>
and not the other way around
#include <iostream>
#include "stdafx.h"
Solution 3:
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.