解决方案:我已经决定为有相同问题的人提供一步一步的指导.我不知道这是否完全解决了所有问题,但它确实让你编译了我将提供的代码片段.如果有任何错误请评论,以便我可以修复它们.这是为了帮助那些大多放弃失败尝试的人,坦率地说,整个过程应该记录在案.对不起,很长的帖子:P
STEP BY STEP FOR SETTING UP MYSQL CONNECTOR/C++ FOR 2010 MICROSOFT VISUAL C++ EXPRESS:
FILES NEEDED:
Windows x86 32 Bit ZIP: Connector/C++ -> http://dev.mysql.com/downloads/connector/cpp/
Windows X86 32 Bit ZIP: Connector/C -> http://dev.mysql.com/downloads/connector/c/
BOOST -> http://www.boost.org/users/download/
The reason why 62bit doesn't work is because you are using the express edition. After you have downloaded all those files, extract them. I keep mine in C (for ease of access). Now open up MVC++ 2010 EXPRESS.
File -> New -> Project
Win32 …Run Code Online (Sandbox Code Playgroud) 我已经在这方面做了一点,我不熟悉JS编程.我正在使用JS,HTML5,node和socket.io制作游戏.我正在研究协议,我正在发送十六进制的服务器字符串.
字符串的示例是:00010203040506070809
我很难将其转换为:0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09
我打算做的是根据数据包获取这些自定义数据包并在我的服务器上切换.例如:
BYTE HEADER | + Packet
0x00 | 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09
Run Code Online (Sandbox Code Playgroud)
然后我调用:parsepacket(header,data,len);
function parsepacket(header, data, len){
switch(header)
{
case '0x00': // not hexed
console.log('The client wants to connect');
// Do some stuff to connect
break;
case '0x01':
console.log('0x01');
break;
case '0x02':
console.log('0x02!');
break;
}
};
Run Code Online (Sandbox Code Playgroud)
有谁知道如何做到这一点?