由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - another tougth pointer example
相关主题
pointer to override function?菜鸟问个C++问题
difference between: char** p and char*p[] ??zero-sized array vs pointer
C++ interdependence questionC 语言,初学者,简单问题
Array in C问一个c语言malloc的问题
ask a simple question about int pointer.ask a question about struct in C programming
问个程序问题请教一个fseek和_fseeki64的问题
C++里get array size的问题 (转载)[合集] 请教一个calloc的问题
A tough pointer conceptC++ template preprocessor
相关话题的讨论汇总
话题: float话题: sizeof话题: pointer话题: tougth话题: example
进入Programming版参与讨论
1 (共1页)
E******T
发帖数: 59
1
float **x;
x = (float **)malloc(k*sizeof(float *)); /* Make space for the data */
in this example, sizeof(float *) and sizeof(float) has any difference? the
denotation * means a pointer?
Thanks
t****t
发帖数: 6806
2
yes, * means pointer... so you have totally no idea about C. better grab an
introductory book and read a bit.

【在 E******T 的大作中提到】
: float **x;
: x = (float **)malloc(k*sizeof(float *)); /* Make space for the data */
: in this example, sizeof(float *) and sizeof(float) has any difference? the
: denotation * means a pointer?
: Thanks

M**u
发帖数: 10158
3
这个tough个啥啊
sizeof (float *) 要存一个指针大小
sizeof (float)要存一个float大小

【在 E******T 的大作中提到】
: float **x;
: x = (float **)malloc(k*sizeof(float *)); /* Make space for the data */
: in this example, sizeof(float *) and sizeof(float) has any difference? the
: denotation * means a pointer?
: Thanks

1 (共1页)
进入Programming版参与讨论
相关主题
C++ template preprocessorask a simple question about int pointer.
请教个static_cast vs reinterpret_cast的问题。问个程序问题
c的问题(2)C++里get array size的问题 (转载)
一个c语言的问题A tough pointer concept
pointer to override function?菜鸟问个C++问题
difference between: char** p and char*p[] ??zero-sized array vs pointer
C++ interdependence questionC 语言,初学者,简单问题
Array in C问一个c语言malloc的问题
相关话题的讨论汇总
话题: float话题: sizeof话题: pointer话题: tougth话题: example