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. Friends i m getting error while intrepreting the e
View Tutorial          By: Hanuman at 2014-02-04 14:14:00

2. It is very help full to me and very simple underst
View Tutorial          By: Reddymalla Babu Sircilla at 2013-02-22 08:28:22

3. Hello,
I've tried the above code, but I've

View Tutorial          By: Phyo Phyo at 2009-09-14 05:32:28

4. Hi Friends.... This code is working correctly with
View Tutorial          By: kasi at 2009-11-25 23:52:56

5. Excellent tutorial thank you very much.

View Tutorial          By: Edd at 2012-01-15 10:49:00

6. the code works fine,i also tried the write code.th
View Tutorial          By: Joy at 2013-11-25 05:24:23

7. Hello every one. I am working on my project in j2m
View Tutorial          By: Pradeep Reddy at 2011-01-04 05:15:51

8. Hello! May I know where is the "main" fu
View Tutorial          By: Angelia at 2009-06-25 18:54:28

9. Hi Rima,

Check out http://forums.su

View Tutorial          By: Ramlak at 2008-12-28 03:00:01

10. now I know what isset is for, thank you very much
View Tutorial          By: Anonymous at 2010-12-23 20:43:29