cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Strange c++ piece of code
Strange c++ piece of code
Jul 4, 2008 at 3:42pm UTC
sleepy
(2)
Hey!
I'm new to c++ and found the following construct:
int c = ((void)b, a);
Compiles and sets c = a. But what does it do !?!
Jul 4, 2008 at 4:26pm UTC
Duthomhas
(13282)
I can't imagine. If the original program redefined the
,
operator to something weird perhaps it does something, but otherwise the code is nonsense. Better to just
int
c = a;
Sorry you had to see that kruft.
Jul 4, 2008 at 4:41pm UTC
sleepy
(2)
Nope, it just compiles by pasting to main() *g*
Topic archived. No new replies allowed.