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. The above example for abstract class is very good.
View Tutorial          By: saafia at 2013-08-19 14:33:54

2. Thanks a lot .. Great work!!
View Tutorial          By: MonamAlwerfally at 2013-03-26 14:41:29

3. I'm a beginner, and I was told it is a good practi
View Tutorial          By: Nelson at 2009-08-17 09:13:28

4. Sir , I am doing BCA . I want to know more about j
View Tutorial          By: sikandar at 2011-05-22 03:09:40

5. well explained.. Thanq :)
View Tutorial          By: Aparna at 2013-03-01 06:08:35

6. This program little hard to understand ..please gi
View Tutorial          By: sarav at 2011-02-17 05:02:46

7. i just got to know about this and i am really imp
View Tutorial          By: spo_mega at 2009-06-11 07:16:38

8. i have a question..i need to parse an xml file wit
View Tutorial          By: meltd0wn at 2011-09-30 08:36:51

9. this is good, but i need a simple program about sh
View Tutorial          By: ramalakshmi at 2011-01-05 03:38:26

10. Your explanation and example for toString() is gre
View Tutorial          By: Dinesh at 2012-10-19 08:29:13