Redian新闻
>
How to send a structure containing a pointer over socket?
avatar
How to send a structure containing a pointer over socket?# Programming - 葵花宝典
B*s
1
I have a socket connection between a client and a server. Now I want to send
a structure containning a pointer pointed to an int array(which indeed is
what i want to send).How am I supposed to do this? Thanks.
avatar
s*u
2
其实你send一个pointer有什么用呢?
pointer就是一个整数,直接send就好了
但是你这个pointer到了另一个电脑上基本就是非法的哦

send

【在 B********s 的大作中提到】
: I have a socket connection between a client and a server. Now I want to send
: a structure containning a pointer pointed to an int array(which indeed is
: what i want to send).How am I supposed to do this? Thanks.

avatar
B*s
3
Yes, that is the problem. In other words, how can I send the structure
including the int array it point to?

【在 s****u 的大作中提到】
: 其实你send一个pointer有什么用呢?
: pointer就是一个整数,直接send就好了
: 但是你这个pointer到了另一个电脑上基本就是非法的哦
:
: send

avatar
s*u
4
只能整个数组传过去吧

【在 B********s 的大作中提到】
: Yes, that is the problem. In other words, how can I send the structure
: including the int array it point to?

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。