Redian新闻
>
请教一个问题,发两个包子。
avatar
请教一个问题,发两个包子。# JobHunting - 待字闺中
a*1
1
只有两个包子了现在。
问题好像被问了很多次了,但没查到答案。谢谢。
这个思路对吗:
int* GetSomeIDs(aliasID*** p_aliasID_io)
怎么用GetNextAlias()? 这个问题说的太不清楚了。
题目是:
Correct the problems with GetSomeIDs(), and add some additional
functionality to it, as follows. A single new version of the function
should be provided.
The new version should:
a) Maintain the same "int *" return type which returns a pointer to fixed
sized array of ints.
b) IN ADDITION to its regular function return, provide to its calling
functions a usable array of poin
avatar
x*y
2
There is something unclear about the problem, but I think one possibility is:
Before calling the GetSomeIDs() function, the length of the array of aliasID
pointers is determined and a pointer is passed as a parameter to the
GetSomeIDs() function: ( we can cast p from void * to aliasID** inside the
function)
int* GetSomeIDs(void * p)
Inside this function, we can call int GetNumberOfAliases(void) to get # of
pointers in the array and dynamically allocate memory which will be assigned to each point

【在 a**1 的大作中提到】
: 只有两个包子了现在。
: 问题好像被问了很多次了,但没查到答案。谢谢。
: 这个思路对吗:
: int* GetSomeIDs(aliasID*** p_aliasID_io)
: 怎么用GetNextAlias()? 这个问题说的太不清楚了。
: 题目是:
: Correct the problems with GetSomeIDs(), and add some additional
: functionality to it, as follows. A single new version of the function
: should be provided.
: The new version should:

avatar
a*1
3
atu1,您好:
您转给 xnxky,现金(伪币):10,收取手续费:0.1
同时附加了如下留言给 xnxky.
thanks
站务
avatar
a*1
4
That will be too complicated compared to other questions.
What I am thinking is there is a collection of aliasIDs already there. Then
generate an array of pointers pointing to those aliasIDs. But there is still
something wrong here.

is:
aliasID
assigned to each pointer in the array(we get the address of these pointers
through void * parameter).
GetNextAlias will return the next available pointer or NULL.

【在 x***y 的大作中提到】
: There is something unclear about the problem, but I think one possibility is:
: Before calling the GetSomeIDs() function, the length of the array of aliasID
: pointers is determined and a pointer is passed as a parameter to the
: GetSomeIDs() function: ( we can cast p from void * to aliasID** inside the
: function)
: int* GetSomeIDs(void * p)
: Inside this function, we can call int GetNumberOfAliases(void) to get # of
: pointers in the array and dynamically allocate memory which will be assigned to each point

avatar
x*y
5
Yes, it's also possible that in the function GetSomeIDS, we assign the array
of pointers some already existing aliasIDS structure, and when exiting from
this function, the call to GetNextAliss will get the next pointer to
aliasID in the array. We can use this method(calling GetSomeIDS and aliasID
iteratively to get all the IDS.) I'm not sure what else are expected....

Then
still

【在 a**1 的大作中提到】
: That will be too complicated compared to other questions.
: What I am thinking is there is a collection of aliasIDs already there. Then
: generate an array of pointers pointing to those aliasIDs. But there is still
: something wrong here.
:
: is:
: aliasID
: assigned to each pointer in the array(we get the address of these pointers
: through void * parameter).
: GetNextAlias will return the next available pointer or NULL.

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