关于C语音指针的问题
比如我声明一个结构体
1typedef struct
2{
3 char number[7];/*序号*/
4 char id[10]; /*配送编号*/
5 char name[10]; /*姓名 */
6 char addr[7]; /*地址*/
7 char time[9]; /*到达时间*/
8}ElemType;
9typedef struct
10 { ElemType Element[MaxSize]; /*存储队列元素数组*/
11 int Rear,Front; /*队头、对尾位置*/
12 }SeqQueue;
13 然后自定义函数
14void Init_SeqQueue(SeqQueue *Sq_pointer) /*构造一个空队列*/
15 {
16 Sq_pointer->Front =-1;
17 Sq_pointer->Rear=-1;
18 /*队尾、队头的位置都设置为-1*/
19 }
20然后在main函数里调用
21main()
22{
23SeqQueue ListQueue;
24 Init_SeqQueue(&ListQueue);
25}
其他省略
我想问的问题是:
为什么我不可以在 14行 和24行同时改为“void Init_SeqQueue(SeqQueue Sq_pointer) ” “Init_SeqQueue(ListQueue);“
就是同时不需要“*指针" 和 "地址&”符号