同样是换行用 cout << pMsg->content.state << endl;就能触发outputdatareceived事件
printf("%s\r\n", temp);就是不行。
在C++编程中,使用`cout<<pMsg->content.state<<endl;`与`printf(%s
,temp);`进行换行时,发现只有前者能触发outputdatareceived事件。这种现象可能与标准输出流的缓冲机制以及endl对象的处理方式有关。
同样是换行用 cout << pMsg->content.state << endl;就能触发outputdatareceived事件
printf("%s\r\n", temp);就是不行。
1592

被折叠的 条评论
为什么被折叠?