E
eddiew_AUS
while playing around to check <blah> for my personal project, I discovered
an anomaly with my code, compiled using (cringe) visual studio ver 6:
#include<iostream>
using namespace std;
int main( void )
{
int k = 3;
cout << k;
cout << " " << k++ << " " << k << " " << ++k << " ";
cout << k << "\n";
}
produces the expected output of:
3 4 4 4 5
while
#include<iostream>
using namespace std;
int main( void )
{
int k = 3;
cout << k;
cout << " " << k++ << " " << k << " " << ++k << " " << k << "\n";
}
produced the output of
3 4 4 4 3
Q: Is this another example of non-standard microsoft compilers, or a result
of the chained function calls?
And another question:
Q: Is it possible to declare the constructor of class B as a friend function
to class A, and if so what is the syntax?
thanks in advance,
ed.
an anomaly with my code, compiled using (cringe) visual studio ver 6:
#include<iostream>
using namespace std;
int main( void )
{
int k = 3;
cout << k;
cout << " " << k++ << " " << k << " " << ++k << " ";
cout << k << "\n";
}
produces the expected output of:
3 4 4 4 5
while
#include<iostream>
using namespace std;
int main( void )
{
int k = 3;
cout << k;
cout << " " << k++ << " " << k << " " << ++k << " " << k << "\n";
}
produced the output of
3 4 4 4 3
Q: Is this another example of non-standard microsoft compilers, or a result
of the chained function calls?
And another question:
Q: Is it possible to declare the constructor of class B as a friend function
to class A, and if so what is the syntax?
thanks in advance,
ed.