Tag: qnx neutrino

通过socket,c,c ++发送int

在socket上发送一组int有麻烦。 代码看起来像这样 程序1(在Windows上运行) int bmp_info_buff[3]; /* connecting and others */ /* Send informations about bitmap */ send(my_socket, (char*)bmp_info_buff, 3, 0); 计划2(在中微子上运行) /*buff to store bitmap information size, with, length */ int bmp_info_buff[3]; /* stuff */ /* Read informations about bitmap */ recv(my_connection, bmp_info_buff, 3, NULL); printf(“Size of bitmap: %d\nwidth: %d\nheight: %d\n”, bmp_info_buff[0], bmp_info_buff[1], bmp_info_buff[2]); 它应该打印位图的大小:64 […]