This is one of the method to overcome this issue.
client.cpp
#ifndef SOCKET_CLIENT_CLASS
#define SOCKET_CLIENT_CLASS
#ifndef BOOST_ASIO_HPP
#include <boost/asio.hpp>
#endif
class SocketClient // Or whatever the name is... {
// ...
bool read(int, char*); // Or whatever the name is...
// ... };
#endif
client.h
bool SocketClient::read(int, char*)
{
// Implementation goes here...
}
main.cpp
#include <iostream>
#include <string>
#include <sstream>
#include <boost/asio.hpp>
#include <boost/thread/thread.hpp>
#include "client.h"
// ^^ Notice this!
main.h
int main()