CString sz[2];
int *n=atoi(sz);
编译不能通过

解决方案 »

  1.   

    no, you cannot do that
      

  2.   

    int * n=(int*)atoi(sz);
    应该没问题,但是你要干什么
      

  3.   

    CString sz[2];
    int *n=atoi(sz);
    好像逻辑不通啊!
      

  4.   

    也许你想要得是:
    CString sz;
    ...
    n = atoi(sz);或者:
    CString sz[2];
    int pn[2];
    ...
    for (int i = 0; i < 2; i++)
        pn[i] = sz[i];当然如果个数比2大的话,循环才比较有意义。
      

  5.   

    char* token;
    token=strok(str,":");
    while(token!=NULL)
    {
    printf("%f",token);
     token=strok(NULL,":")
    }