I am sorry, it was my fault. The program is a small part of the largest project. The following works as a console Win32 application from existing code.
Code:
typedef int integer;
#include <stdio.h>
#include <stdlib.h>
integer main(void) {
double a;
FILE *str;//place the breakpoint here
if ((str = fopen("init1.txt", "r")) == NULL) {
fprintf(stderr, "Cannot open init file 1\n"); getc(stdin);
return 1;
}//if
fseek(str, 0, SEEK_SET);
fscanf(str, "%lf\n", &a);
fclose(str);
return 0;
}//main
The debugger replies as follows:
- str 0x6a7c1448 {_ptr=0x00000000 <Bad Ptr> _cnt=0 _base=0x00000000 <Bad Ptr> ...} _iobuf *
+ _ptr 0x00000000 <Bad Ptr> char *
CXX0030: Error: expression cannot be evaluated
_cnt 0 int
+ _base 0x00000000 <Bad Ptr> char *
CXX0030: Error: expression cannot be evaluated
_flag 1 int
_file 3 int
_charbuf 0 int
_bufsiz 0 int
- _tmpfname 0x00000000 <Bad Ptr> char *
CXX0030: Error: expression cannot be evaluated
Once again thank you for the prompt response.