E
evan
I am calling a C function from a C++ method as follows:
int mem_if::read(void) {
int i;
for(i = 0; i < 5; i++) {
printf("A");
E2Read(i);
}
return size;
}
, where the C function is:
void E2Read(int i) {
printf("B");
.... (no function calls)
}
I would expect the output to be something along the lines of:
ABABABABAB
, but I am getting something more like:
BBBBBAAAAA
What is going on????? It is like the C++ printfs are getting buffered
and are printed out way after they should be.
/evan
int mem_if::read(void) {
int i;
for(i = 0; i < 5; i++) {
printf("A");
E2Read(i);
}
return size;
}
, where the C function is:
void E2Read(int i) {
printf("B");
.... (no function calls)
}
I would expect the output to be something along the lines of:
ABABABABAB
, but I am getting something more like:
BBBBBAAAAA
What is going on????? It is like the C++ printfs are getting buffered
and are printed out way after they should be.
/evan