X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: Mok-Kong Shen Newsgroups: comp.os.msdos.djgpp Subject: assert statement is not accepted in C++ Date: Mon, 07 Feb 2005 15:30:35 +0100 Organization: T-Online Lines: 17 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.t-online.com 1107786506 00 882 M+ilr8wOI9PO18j 050207 14:28:26 X-Complaints-To: usenet-abuse AT t-online DOT de X-ID: GziwcOZFgeZisUA-9q+6gU3tLggIvOpKxQkdK1yFYSuUk8zRBsw+gh User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com The following code works o.k. (in DJGPP Version 2.03) with file name prog.c but doesn't compile with file name prog.cc. (Error message 'undefined reference to .....', which vanishes when the assert statement is commented out.) #include #include int main() { int i=1; assert(i>0); printf("i = %d\n",i); return 0; } M. K. Shen