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. why return&else statment repeating?
View Tutorial          By: sudhar at 2012-07-12 14:50:45

2. haii...
I am Ahmed , i am in 3rd btech ,

View Tutorial          By: Ahmed at 2014-08-09 06:30:11

3. Hi i changed some codes in that and i gave interne
View Tutorial          By: Göktuğ ÖZEL at 2013-03-13 22:44:55

4. Superb article
View Tutorial          By: Raj at 2015-01-29 11:18:22

5. can client use prinwriter?????
View Tutorial          By: sujay at 2009-02-20 00:23:33

6. How to use Shift operators with practicals in java
View Tutorial          By: RosyKrish at 2013-01-17 02:42:37

7. Thank you for a great explanation now I'm in the l
View Tutorial          By: C++Noob at 2011-12-22 04:43:31

8. hi i unable to retrive am getting below excepti
View Tutorial          By: vignesh at 2015-03-25 17:14:58

9. Can i have CreateAddressBook.java?? really need it
View Tutorial          By: KIM at 2012-12-02 11:45:20

10. hello, that was very useful
but i have a by

View Tutorial          By: echo at 2011-04-05 11:50:41