I remember in college there was a way to make initialize an object writing a series of member variables initialization, separated by commas like in the code example from bellow, but i cant remember how it was called.
class A
{
public:
string s1, s2, s3;
A()
{
}
};
#include "A.h"
int main()
{
A a
{
s1 = "String1",
s2 = "String 2",
s3 ="String 3"
}
}
What else should i type in order for that constructor like list to work?