由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - 请教一个rpcgen的问题
相关主题
how to initialize this struct.typedef
为啥有人喜欢把_s结尾的结构typedef成_t结尾的,有讲究么?typedef struct的问题
sizeof()的问题一个简单的C编程问题
请教函数 INIT 怎么能free memory有段c++代码看不懂
difference between FILE and struct FILE请教一个c++ 里functor的问题
请问可以这样定义struct吗?问个编程,系统,网络有关的综合问题。
[合集] Interview Questiontypedef 的一个问题
ask a question about struct in C programmingOne question about Void pointer
相关话题的讨论汇总
话题: server话题: rpcgen话题: candidate话题: nametype话题: 内存
进入Programming版参与讨论
1 (共1页)
e********r
发帖数: 2352
1
(1)server side 的string type内存是怎么分配的:
在.x文件里定义了:
typedef string nametype<100>;
struct candidate
{
nametype name;
int number;
}
在server文件里定义一个array:
candidate array[10];
arry[0].name 怎么好像和array.name[1] 共用内存,改了一个另一也会变, 请问哪位
老大可以指教一下.
(2)还是上面这个struct,可以从client side 传一个candidate type varible 到
server, 但是从server 传一个candidate到client就会crush, 这两个问题是不是都是
因为server side内存分配的问题.
1 (共1页)
进入Programming版参与讨论
相关主题
One question about Void pointerdifference between FILE and struct FILE
Questions about c code请问可以这样定义struct吗?
用c怎么实现generic stack (转载)[合集] Interview Question
请教如何初始化这个C data structure Steque的object?ask a question about struct in C programming
how to initialize this struct.typedef
为啥有人喜欢把_s结尾的结构typedef成_t结尾的,有讲究么?typedef struct的问题
sizeof()的问题一个简单的C编程问题
请教函数 INIT 怎么能free memory有段c++代码看不懂
相关话题的讨论汇总
话题: server话题: rpcgen话题: candidate话题: nametype话题: 内存