Tag: comments

printf与scanf请求输入。 BST循环错误

我一直试图看看为什么printf在打印文件输入后没有打破循环。 .c文件是BST,我现在正在测试是否已经构建了一个树,但似乎无法退出printf循环。 我需要printf循环来获得代码的正确输出。 有关此错误发生原因的任何建议。 显示完整的代码和输出。 #include “bst.h” #include #include ///Author: Joe W //arbitrary list of temp nodes TreeNode *new_node, *root, *tmp, *parent; int elemArray[100], i1, i2, i0; /* Insert a new node into the tree by referencing the root and using recursion */ TreeNode* getN(int dataElem) { TreeNode* temp; temp = malloc(sizeof(TreeNode*)); temp-> left = […]

在运行期间,评论可以有什么不同吗?

阅读这篇评论的最佳评论是什么 ,赞成了201次: 很久以前,我偶然通过添加注释修复了Java3D中的段错误。 它是100%可重复的; 如果我删除了评论,它就会崩溃。 只要评论在那里,它运作良好。 我认为这是一个奇怪的计时问题,但我从来没有弄清楚究竟发生了什么。 这可能吗? 如果他正在修复Java3D中的段错误,我猜他正在用Java或C / C ++编写代码。 我认为在任何一种语言中,评论都会在编译之前被删除……