F
fazulu deen
Hi all,
For the following code :
file_ptr = fopen("pass_fail.txt", "a"); // error line 393
fdisplay(file_ptr, "Test Passed");
fclose(file_ptr);
resa = resa + 1;
}
else
{
printf("\nTEST FAILED\n\n\n");
file_ptr = fopen("pass_fail.txt", "a"); //error line 402
fdisplay(file_ptr, "Test Failed");
fclose(file_ptr);
}
}
else
{
if( vube_n.read() == 1 )
{
printf("\nTEST PASSED\n\n\n");
file_ptr = fopen("pass_fail.txt", "a");
fdisplay(file_ptr, "Test Passed");
fclose(file_ptr);
resa = resa + 1;
}
else
{
printf("\nTEST FAILED\n\n\n");
file_ptr = fopen("pass_fail.txt", "a");
fdisplay(file_ptr, "Test Failed");
fclose(file_ptr);
}
}
}
I am getting the error as:
testbench.h: In member function `void
testbench::always_process_238()':
# testbench.h:393: invalid conversion from `FILE*' to `int'
# testbench.h:394: `fdisplay' undeclared (first use this function)
# testbench.h:394: (Each undeclared identifier is reported only once
for each
# function it appears in.)
# testbench.h:395: invalid conversion from `int' to `FILE*'
# testbench.h:402: invalid conversion from `FILE*' to `int'
# testbench.h:404: invalid conversion from `int' to `FILE*'
# testbench.h:414: invalid conversion from `FILE*' to `int'
# testbench.h:416: invalid conversion from `int' to `FILE*'
# testbench.h:423: invalid conversion from `FILE*' to `int'
# testbench.h:425: invalid conversion from `int' to `FILE*'
How to resolve the above error??where is the mistake??
regards,
fazal
regards,
fazal
For the following code :
file_ptr = fopen("pass_fail.txt", "a"); // error line 393
fdisplay(file_ptr, "Test Passed");
fclose(file_ptr);
resa = resa + 1;
}
else
{
printf("\nTEST FAILED\n\n\n");
file_ptr = fopen("pass_fail.txt", "a"); //error line 402
fdisplay(file_ptr, "Test Failed");
fclose(file_ptr);
}
}
else
{
if( vube_n.read() == 1 )
{
printf("\nTEST PASSED\n\n\n");
file_ptr = fopen("pass_fail.txt", "a");
fdisplay(file_ptr, "Test Passed");
fclose(file_ptr);
resa = resa + 1;
}
else
{
printf("\nTEST FAILED\n\n\n");
file_ptr = fopen("pass_fail.txt", "a");
fdisplay(file_ptr, "Test Failed");
fclose(file_ptr);
}
}
}
I am getting the error as:
testbench.h: In member function `void
testbench::always_process_238()':
# testbench.h:393: invalid conversion from `FILE*' to `int'
# testbench.h:394: `fdisplay' undeclared (first use this function)
# testbench.h:394: (Each undeclared identifier is reported only once
for each
# function it appears in.)
# testbench.h:395: invalid conversion from `int' to `FILE*'
# testbench.h:402: invalid conversion from `FILE*' to `int'
# testbench.h:404: invalid conversion from `int' to `FILE*'
# testbench.h:414: invalid conversion from `FILE*' to `int'
# testbench.h:416: invalid conversion from `int' to `FILE*'
# testbench.h:423: invalid conversion from `FILE*' to `int'
# testbench.h:425: invalid conversion from `int' to `FILE*'
How to resolve the above error??where is the mistake??
regards,
fazal
regards,
fazal