我想要的是,如果buff
线程内数组中的数据发生变化,全局变量global_buff
数据也必须改变
#include <process.h>
.........
char global_buff_1[50];
char global_buff_2[50];
void thread (int x)
{
char buff[50] = {0};
if (x == 0)
buff = global_buff_1; //this is what i need, how can i equal two array correctly. i want to if buff array data changing the global_buff also changing.
else
buff = global_buff_2;
.............
//do some thing
.............
}
int main(int argc, char* argv [])
{
...................
int y = 0;
_beginthread((void(*)(void*))thread, 0, (void*)y);
.....................
}
任何帮助!