【发布时间】:2014-09-16 09:24:07
【问题描述】:
我需要帮助,我有一个结构
typedef struct {
unsigned char data0;
unsigned char data1;
// like this 8 bytes of data in my structure
} MyStruct;
typedef struct {
Mystruct my_st[8];
} Info1;
typedef struct {
unsigned char My_Array[8][7];
} Info2;
//now i want to pass the array of 8 structures in Info1 and 2D array of Info2 .
My_Function( &Info1->my_st[8], &Info2->My_Array[8][7]);
这是正确的方法,否则请告诉我。
【问题讨论】:
-
My_Function( &Info1, &Info2);?这会将结构传递给 My_Function。MyStruct的定义不正确。
标签: c++ c arrays visual-c++ character-arrays