Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++.moderated > #7373
| Message-ID | <a8d71d07-329c-41de-a5ff-ff5a06e3017d@googlegroups.com> (permalink) |
|---|---|
| Newsgroups | comp.lang.c++.moderated |
| From | Joe Bentley <joe.foxhound@googlemail.com> |
| Subject | Initialization of data members inside a class |
| Organization | unknown |
| Date | 2016-02-21 13:20 -0600 |
Is it permissible to initialize non-static data members inside a class,
like so?
class whatever
{
int x = 9;
const int y = 10;
...
};
If so, is there a reference in the "standard" that grants this
permission, and when did this syntax come about?
Thanks
--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
Back to comp.lang.c++.moderated | Previous | Next — Next in thread | Find similar
Initialization of data members inside a class Joe Bentley <joe.foxhound@googlemail.com> - 2016-02-21 13:20 -0600 Re: Initialization of data members inside a class Norbert_Paul <norbertpauls_spambin@this.is.invalid> - 2016-02-22 06:47 -0600 Re: Initialization of data members inside a class legalize+jeeves@mail.xmission.com (Richard) - 2016-02-22 14:26 -0600
csiph-web