Page 1 of 1
[Resolved]: anyone know what does (x,y) do?
Posted: Sun Jul 20, 2003 7:12 pm
by bugzpodder
i came a few program that has a simple statement, something like:
(x,y);
whatever does that line do?
Posted: Sun Jul 20, 2003 8:49 pm
by Julien Cornebise
Hi !
Could you please post an example here to help see the context ?
Posted: Mon Jul 21, 2003 6:26 pm
by anupam
may be a objct of a class initailization.
Posted: Mon Jul 21, 2003 6:48 pm
by Viktoras Jucikas
This might shed some light on comma operators:
http://tinyurl.com/hkym
And code example is:
[cpp]
char* x = (char*) -1;
if( x = 0, delete x++, (int)x )
{
// do something
}
[/cpp]
Now this is called 'readable' code...
Posted: Tue Jul 22, 2003 9:17 am
by anupam
thanks for help but is it what he asked actually?
I am not sure. plz describe ...
Posted: Tue Jul 22, 2003 7:52 pm
by bugzpodder
yeah thanks, its probably something like that. i have never heard of a comma operator before, so its very itneresting