Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
int main(int argc, char *argv[]) { printf("Temp is"); msgrcv(externalQid, &incomingMsg, sizeof(incomingMsg)-sizeof(long), 0, 0); }
在这种情况下,printf 从不实际打印……但是,如果我没有 msgrv 调用,它确实会打印出来……这使得调试我的程序变得非常困难。有任何想法吗?
尝试在 printf 的末尾添加一个换行符。我对“为什么”并不十分熟悉,但它解决了我不久前遇到的类似问题。