这个问题在这里已有答案:
添加两个数字而不使用运算符 3个答案想想我使用win32 api的createthread()创建了2个线程的场景。 我正在连接到一个串口的一个线程中继续数据,第二个线程将对线程1的数据执行操作。我将数据存储在一个缓冲区中,但是我想在线程2中使用该缓冲区,这样我就可以使用thraed 2函数继续对数据进行操作了。 所以我如何在两个线程之间共享数据。
This question already has an answer here:
Adding two numbers without using operators 3 answersthink about scenario like i have created 2 threads using createthread() of win32 api. i am getting continues data in one thread which is connected to one serial port and 2nd thread will perform operation on the data of thread 1. i stored the data in one buffer in thraed 1. but i want to use that buffer in thread 2 , so that i can continue my operation on data by using thraed 2 function. so how i can share the data between two threads.
最满意答案
printf函数返回写入的元素数。 在这种情况下,字符数是x (第一个%*c )和y (第二个)之和。
The printf functions returns the number of elements written. In this case is the number of characters which is the sum of x (the first %*c) and y (the second).
更多推荐
发布评论