cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
Class definition inside function body
Class definition inside function body
Mar 3, 2013 at 9:40am UTC
Catfish3
(666)
Hello. Is this standard-compliant code?
1
2
3
4
5
6
7
8
9
10
11
int
f() {
class
C {
public
:
int
mf()
const
{
return
1;} }; C c;
return
c.mf(); }
Mar 3, 2013 at 9:46am UTC
Peter87
(11234)
Yes.
Topic archived. No new replies allowed.