What I want to use has no default constructor - so in my class definition, I need to call a parameterized constructor inside that class.
My question is - how?
class ServerSocket
{
public:
....
private:
....
asio::io_context io_context;
tcp::socket socket(io_context); //the compiler will think this is a function definition -
//but it isn't, I want to instantiate an object of type tcp::socket
//with io_context as a parameter
ServerSocket()
{
//I thought about moving tcp::socket here, but then I won't have access to the socket accross the class
}
};