Debug Assertion Failed!

J

jerry

i have a problem:
when i run a program,it pop up a windows,title is
microsoft visual c++ failed!
contents are:
program: ...io\myprojects\phonebook\debug\phonebook.exe
file:fopen.c
line:54
expression: *file !=_T('\0')
for information on how your program can cause an assertion failure,see
the visual c++ doucmention on asserts.
(please retry to debug the application)
abort(A) retry(R) ignore(I)

can someone give me a suggestion ,where's the fopen.c what dose
*file !=_T('\0') mean,and where can
i get documentation on asserts?
ps. befor it occures,my program run at :
if (!fout.is_open ())
{
cerr << "Can't open file: " << fileName;
exit(EXIT_FAILURE);
}
and if i select ignore
the cmd windows display Can't open filepress any key
to continue.
thanks a lot!
 
P

peter koch

i have a problem:
when i run a program,it pop up a windows,title is
microsoft visual c++ failed!
contents are:
program: ...io\myprojects\phonebook\debug\phonebook.exe
file:fopen.c
line:54
expression: *file !=_T('\0')
for information on how your program can cause an assertion failure,see
the visual c++ doucmention on asserts.
(please retry to debug the application)
abort(A) retry(R) ignore(I)

can someone give me a suggestion ,where's the fopen.c  what dose
*file !=_T('\0') mean,and where can
i get documentation on asserts?
ps. befor it occures,my program run at :
        if (!fout.is_open ())
        {
                cerr << "Can't open file: " << fileName;
                exit(EXIT_FAILURE);
        }
and  if i select ignore
the cmd windows display Can't open filepress any key
to continue.
thanks a lot!

It tells you that you have passed a string of length 0 (the first
character is \0) as the filename to fopen.
assert should be described in your favourite C/C++ book - if it is
not, use google.

/Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,571
Members
45,045
Latest member
DRCM

Latest Threads

Top