By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,159 Members | 956 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,159 IT Pros & Developers. It's quick & easy.

What's the meaning of this sentence, "0;"?

P: n/a
0;
The above sentence can be compiled. What does it mean? Why C++ can compile
such sentence?

Jul 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
fadics wrote:
0;

The above sentence can be compiled.
What does it mean?
Nothing.
Why C++ can compile such sentence?
Because 0 is a perfectly valid expression in C.
cat f.c void f(void) {
0;
}
gcc -Wall -std=c99 -pedantic -c f.c

f.c: In function `f':
f.c:2: warning: statement with no effect
Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.