socketio / socket.io-client-cpp

C++11 implementation of Socket.IO client
MIT License
2.26k stars 730 forks source link

error: expected unqualified-id before ‘(’ token when using emit event #414

Open hoainam10th123 opened 11 months ago

hoainam10th123 commented 11 months ago

when I use:

 _io->socket()->emit("join conversation", data);

If there is an error, use the following method: error: expected unqualified-id before '(' token I have attached a photo of the error: socket emit error I don't understand where I went wrong. please help me.

timurchak commented 11 months ago
image

https://github.com/socketio/socket.io-client-cpp/blob/master/examples/QT/README.md