所以我想读取一个文件,我应该有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;
<小时/>
抱歉,我编译错误,现在可以了。
最佳答案
对于 str2card
和 card2str
,原型(prototype)和实际功能有所不同。它们必须是相同的。可能其他的也一样。
您这里有原型(prototype):
// 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){
...
}
关于c - 使用 fget 和解析,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13280135/