fi********@126.com wrote:
In vc 6.0:
#include <iostream>
using namespace std;
int main()
{
int a = 10;
int b = 20;
a = (a + b) - (b = a);
cout << "a=" << a << ",b=" << b << endl;
return 0;
}
Release output : a=20,b=10
Debug output: a=10,b=10
why?
Because, on close examination of the newsgroups name, you might
detect the absence of the '++' portion. To an eagle eyed
programmer of your mental capability this might carry connotations
indicating that C++ is not the subject under discussion. Such an
alert usenet user might then decide to use comp.lang.c++, and would
still be wrong. VC of any vintage is a proprietary compiler, and
probably bad (considering the origin), but is not on topic in any
newsgroup that discusses a pure language as defined by standards.
--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
More details at: <http://cfaj.freeshell.org/google/>
Also see <http://www.safalra.com/special/googlegroupsreply/>