initializer list c++:
Initializing structs member by member is a little cumbersome, so C++ supports a faster way to initialize structs using an initializer list. This allows you to initialize some or all the members of a struct at declaration time.
struct ccplusplus {
};
ccplusplus info = {"http://www.ccplusplus.com/", "Saurabh Gupta", 24, "India", "19-Dec-2011"};
Example:
No comments:
Post a Comment