如何在Windows下的C中发送矢量 [英] How to send the vector in c under windows

查看:65
本文介绍了如何在Windows下的C中发送矢量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

先生,我创建了tcp客户端和服务器程序

我想从客户端向服务器端发送一个向量(具有结构的向量)..

您能为我的需求提供任何建议吗?...

sir i created tcp client and server program

i want to send one vector (vector having the structure) from client side to server side..

can you give any suggestions for my requirement....

推荐答案

您需要序列化/反序列化您的数据.

删除的答案提供了使用XML的序列化.这是一个很好的解决方案.
如果愿意,可以使用二进制数据,但思路仍然相同.
You need to serialize/deserialize your data.

The deleted answer offered a serialization using XML. This is a good solution.
You can use binary data if you prefer but the idea remains the same.


这篇关于如何在Windows下的C中发送矢量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆