newyj 发表于 2008-4-30 13:39

这道题怎么运行?

编译通过了 但是 不能运行
不知道是那里错了
#include<iostream.h>
int main()
{
    char *colors[]={"Red","Blue","Yellow","Green"};
    char **pt;            
    pt=colors;
    for (int i=0;i<=3;i++) {
        cout<<"pt="<<pt<<endl;
        cout<<"*pt="<<*pt<<endl;
        cout<<"**pt="<<**pt<<endl;
        pt++;
    }
    return 0;
}

sunkaidong 发表于 2008-4-30 13:41

我能运行...

newyj 发表于 2008-4-30 13:51

我再编译了一次 现在能运行了
不知道 刚才为什么不行
还谢谢 楼上 亲自调试

页: [1]

编程论坛