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
access to initialisation list
access to initialisation list
Dec 8, 2016 at 4:00pm UTC
nuderobmonkey
(640)
Can someone say, how I get access to the optional arguments of an initialisation list?
For example:
My_Container<string> mc = {
"apple"
,
"orange"
,
"cherry"
};
How must I write the constructor for such class?
Thanks for help :-)
Dec 8, 2016 at 4:16pm UTC
coder777
(8450)
You can use initializer_list:
http://www.cplusplus.com/reference/initializer_list/initializer_list/
Dec 8, 2016 at 5:00pm UTC
nuderobmonkey
(640)
Thank you, coder!
Topic archived. No new replies allowed.