boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - How to send a structure containing a pointer over socket?
相关主题
c++ pointers are iterators, why?
请问delete的问题
deque的pointer和reference是怎么回事?
std::map 为什么没有排序呢
通过日志分析yarn app实际内存用量
Go’s path to becoming a Top 10 if not Top 5 language
最新的MS面试题 (转载)
要不要学JAVA
Anybody help me on these questions?
why use template?
相关话题的讨论汇总
话题: send话题: pointer话题: structure话题: socket话题: containing
进入Programming版参与讨论
1 (共1页)
B********s
发帖数: 3610
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.
s****u
发帖数: 118
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.

B********s
发帖数: 3610
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

s****u
发帖数: 118
4
只能整个数组传过去吧

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

1 (共1页)
进入Programming版参与讨论
相关主题
why use template?
Question on C++ Access Control (protected)
What language I should use?
find the subarray
How to define a data type of 1 bit size?
问个BT问题 :)(c )
Re: 110道C++面试题目,你会做多少? (转载)
一个C++的概念问题
又一道面试题,我是不是想多了?
算法问题
相关话题的讨论汇总
话题: send话题: pointer话题: structure话题: socket话题: containing