使用fget和解析

时间:2012-11-07 23:32:18

标签: c parsing io stack

所以我想读一个文件,我应该有4个函数: 它是主要功能

/* Queue functions */

/* Basic type for the queue data structure */
typedef struct queue {
  node *front;          /* Front of the line */
  node *rear;   

    /* Back of the line */
} queue;

抱歉,我编错了,现在有效。

1 个答案:

答案 0 :(得分:1)

对于str2cardcard2str原型和实际功能不同。他们必须是一样的。也可能和其他人一样。

你有原型:

// Utility functions
node_data str2card(char *buf);
char *card2str(node_data c, char *buf);

以后的功能:

/* Convert a string like 14D into a card */
card str2card(char *buf){
...
}
...
/* Given a card c, put a string like 14D in buf representing it.  Good
for printing  */
char *card2str(card c, char *buf){
...
}