Ejemplo n.º 1
0
void initMid(Sequence* midSequence, char* strMid) {
    int i = 0;
    while (strMid[i] != '\0') {
        ExpressionEle ele;
        initEle(&ele, strMid, &i);
        addLast(midSequence, ele);
    }
}
Ejemplo n.º 2
0
int main (int argc, char const* argv[])
{
   pthread_t getkey_t,proc_t;           //线程ID
   initEle();                           //初始化
   pthread_create(&getkey_t,NULL,(void *)&getKey,NULL);  //创建键盘获取线程
   pthread_create(&proc_t,NULL,(void *)&procEle,NULL);   //创建电梯处理线程
   pthread_exit(NULL);                  //等待线程结束
   return 0;
}