this is my code, when I comment all output code(printf cout), the compiler told me "Debug Error!", why?
#include <stdio.h>
#include <string.h>
#include <iostream>
using namespace std;
int main ()
{
char buf[]=" 1 1 1201 1 -0.349200000000000D+06 0.115200000000000D+06";
char* cpr;
/* cout<<sizeof(buf)<<endl;*/
/* cout<<(buf+25)<<endl;*/
for (cpr = buf+25; cpr <buf+710; )
{
if( (cpr=strchr( cpr, 'D') )!=NULL)
{
*cpr = 'E';
}
else{
cpr = buf+710;
}
}
/* printf("%s\n",buf);*/ comment
double t;
double r;
sscanf(buf+25, "%24le%24le", &t, &r);
/* printf("%f\n%f\n", t, r);*/
return 0;
}