开发者

Boost Chat Server Example: expected type-specifier before 'sessiosn'

开发者 https://www.devze.com 2023-02-27 08:01 出处:网络
Offending line: session_ptr new_session(new session(io_service_, room开发者_JAVA技巧_)); (server.cpp, line 197)

Offending line:

  session_ptr new_session(new session(io_service_, room开发者_JAVA技巧_));

(server.cpp, line 197)

Example I'm trying to follow:

http://www.boost.org/doc/libs/1_46_1/doc/html/boost_asio/examples.html (Chat)

I removed all the "chat_" prexfixes from message, client, and server, because I'll be modifying it from a client / server chat into a distributed computing thinger.


You say you removed "chat_" from the chat_session declarations. Unfortunately, that code uses "session" as a variable name. You're probably seeing a conflict where the name "session" is being masked by a variable declaration. (in handle_accept) Try using "Session" or some other name instead.

0

精彩评论

暂无评论...
验证码 换一张
取 消