Hi all,
in this code, 164th byte from file is 1a. it is displaying as -1 instead of 26 ie decimal value.
what should i have to do to get 26 as a decimal value of 1a????
Code:
int main() { FILE *fp1; char *c, *d; c = new char[54]; d = c; fp1=fopen("C:\\xyz.dcm","r"); for(int i=128;i<=163;i++) { fseek(fp1,i,SEEK_SET); *d =(char )fgetc(fp1); d++; cout<<*c++; } for(int j=164;j<=166;j++) { fseek(fp1,j,SEEK_SET); cout <<dec << fgetc(fp1) <<endl; } return 0; }
what should i have to do to get 26 as a decimal value of 1a????
Comment