I'm trying to learn C++. I have a little bit of python in my background. Is there anyway to do the string formatting in C++ just like I did in python using format?
class Employee{ public: int pay; string Lname; string Fname; string email;
Employee(int apay, string aLname, string aFname){
pay = apay;
Fname = aFname;
Lname = aLname;
email = "%s.%s@gmail.com", aFname, aLname;
// in python i could do email = "{}.{}@gmail.com".format(aFname, aLname)
I expect the output of cout << emp1.email;
to be first.last@gmail.com.