Re: [Dev-C++] Dev-C++ Bug? Using backslash within comments
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Jonathan D. <gri...@ho...> - 2005-07-06 14:19:50
|
Here's an example program, though if you'd like to see the compiled program I found it on, check out http://www.maybe-phil.net/websites/no-skill/jnrdev/en/jnrdev3/ That program is based on SDL, so if you're not into that, just use this one: ----------------- #include <stdio.h> #include <iostream> int main(int argc, char *argv[]) { int y; int x = 200; // let's cause a problem with backslash \ y = x*55; printf("%d\n",y); system("PAUSE"); printf("\n"); // now without it y = x*55; printf("%d\n",y); system("PAUSE"); return 0; // shouldn't the compiler ignore everything after these C++ style comments? } ------------------ That about shows it. I know it's a little bother and I'm not surprised it hasn't come up before, but I just wanted to help in case someone else gets stuck. Of course, it's only a problem with the C++ style comments. _________________________________________________________________ Is your PC infected? Get a FREE online computer virus scan from McAfee® Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 |