Click here to Skip to main content
15,919,931 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi can you tell me what does the "ASSERT" function do?
please explain.
Posted

You should have simply Googled it.

Assert will terminate the program with a message quoting the assert statement, if its argument turns out to be false.
It's commonly used during debugging to make the program fail if an unexpected condition occurs.

A good article explaining it: Assert is your friend[^]

Also refer:
http://www.cplusplus.com/reference/clibrary/cassert/assert/[^]
http://www.functionx.com/cpp/Lesson06.htm[^]
http://msdn.microsoft.com/en-us/library/9sb57dw4.aspx[^]
 
Share this answer
 
v3
MFC ASSERT[^]

It forces a DebugBreak() if the evaluation within the brackets is not true

it ASSERTS that something is true
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900