| Christof Meerwald@freec++.prog | ||||
Void ReturnSee 6.6.3 The return statement [stmt.return]
unsigned ctr = 0;
int f1(unsigned i)
{
ctr += i;
return 0;
}
void g1()
{
return (const volatile void) f1(1);
}
void f2(unsigned i)
{
ctr += i;
}
void g2()
{
return f2(2);
}
int main()
{
g1();
g2();
return !(ctr == 3);
}
| ||||
This Web page is licensed under the Creative Commons Attribution - NonCommercial - Share Alike License. Any use is subject to the Privacy Policy.
|
Revision: 1.3, cmeerw.org/prog/freecpp/return_void.html Last modified: Mon Sep 03 18:20:50 2018 |
Christof Meerwald <cmeerw@cmeerw.org> XMPP: cmeerw@cmeerw.org |