为什么出来的结果是0那?杂不是1000000?该如何处理

为什么出来的结果是0那??杂不是1000000??????????????
#include <iostream>
#include   <cstring>
using   namespace   std;
void   main()
{
    int   errors=0;
    const   char   *pc= "a   vdry   long   literal   string ";
    for(int   ix=0;ix <1000000;++ix)
    {
    int   len=strlen(pc);
    char   *pc2=new   char[len+1];
    strcpy(pc2,pc);

    if(strcmp(pc2,pc))
    ++errors;
    delete   []   pc2;
    }
    cout < < "C-style   character   strings: "
    < <errors   < < "   errors   occurred.\n ";
}

------解决方案--------------------
当然是0如果要100000的话:
#include <iostream>
#include <cstring>
#include <conio.h>
using namespace std;
void main()
{
int errors=0;
const char *pc= "a vdry long literal string ";
for(int ix=0;ix <1000000;++ix)
{
int len=strlen(pc);
char *pc2=new char[len+1];
strcpy(pc2,pc);

if(!strcmp(pc2,pc))
++errors;
delete [] pc2;
}
cout < < "C-style character strings: "
< <errors < < " errors occurred.\n ";
getch();
}

------解决方案--------------------
if(strcmp(pc2,pc))
如果PC2和PC不同,则。。。~
------解决方案--------------------
if(strcmp(pc2,pc)) //永远是0,
++errors; //不会执行到
------解决方案--------------------
if(strcmp(pc2,pc))
++errors;

strcmp相等返回0,也就是++errors没有被执行到

这个if语句执行后errors不是0就是1,怎么可能是1000000,是if,不是while,不会循环的

------解决方案--------------------
为什么要1000000?你这里又没error发生。
------解决方案--------------------
看错了,外面有个for
那是因为pc和pc2相等,if里面的语句没有被执行到
------解决方案--------------------
strcmp(pc2,pc)返回值是0,所以++errors不会执行到。