c - 使用 fget 和解析

标签 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;
<小时/>

抱歉,我编译错误,现在可以了。

最佳答案

对于 str2cardcard2str ,原型(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/

相关文章:

javascript - 如何使用 Json 解析正则表达式文本

java - 解析xml文档Java "cannot be resolved"

c - Linux 键盘原始读取,从/dev/input/event0 读取或从stdin 读取哪个更好?

python - Tkinter GUI、I/O 和线程 : When to use queues, 何时发生事件?

c - 管道缓冲区大小是 4k 还是 64k?

c - fork 后 libev 出现段错误

c - 尝试在 C 中创建链表

c - 如何自动将类型转换添加到 c 源代码中的 printf 样式函数?

php - 如何获取媒体 :content with SimpleXML

java - 扫描器在使用 next() 或 nextFoo() 后跳过 nextLine()?