Comment on Tutorial - assert() example program in C++ By Charles



Comment Added by : Ryba

Comment Added at : 2010-05-19 15:45:48

Comment on Tutorial : assert() example program in C++ By Charles
it should be:
/* --------------- */
#define ASSERT(x)
if (x) {} \
else { \
//.. bla bla bla
debugBreak();
}
/* ---------------- */

Gues what happen if u use ur version like that:
if (x < 3)
ASSERT(x >= 0);
else
doSomeStuff();

;]


View Tutorial



Subscribe to Tutorials

Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. Hi Ramalak, I am suffering with the same error as
View Tutorial          By: Divya at 2008-11-06 22:46:12

2. Is it possible to define a class such that the pri
View Tutorial          By: Smithy at 2012-05-01 22:50:58

3. its amazing for me i learn a lot from it thanks..
View Tutorial          By: sufyan at 2014-10-26 14:39:34

4. Your solution is really helped me. Thanks for your
View Tutorial          By: Rajakumar at 2010-05-31 06:05:53

5. in my application i have got several command link,
View Tutorial          By: Carlo at 2009-09-04 04:48:23

6. Very simple and easy to understand... Thank u...
View Tutorial          By: Anu Priya at 2013-07-22 09:00:19

7. Thank you. It is very good.
View Tutorial          By: tapes pra at 2011-12-08 09:23:31

8. introduction is very clear i get wat answer i want
View Tutorial          By: kalyan at 2013-07-02 09:23:40

9. Very nice article.
Thank you

View Tutorial          By: Ahmed Adel at 2013-02-11 18:33:51

10. hi
thanks for your code i wanted to know w

View Tutorial          By: anshul at 2009-10-28 15:10:10