How to call another constructor?

How can I call a constructor from a constructor?

1
2
3
Txt::Txt(int i) {
	this->Txt("");
};

You can't explicitly call a constructor, not sure what you're trying to do here, but it seems like poor design
In C++11 you can do it like this
Txt::Txt(int i) : Txt("") {}
Last edited on
Topic archived. No new replies allowed.