Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import std.stdio : log = writeln;
- void main() {
- log("Let's check whether 'this' is an lvalue");
- Button btn = new Button("A button");
- }
- class Button
- {
- this(string btntext)
- {
- mtext = btntext;
- log("button created with the name , ", btntext);
- log(&this);
- }
- private:
- string mtext;
- }
Add Comment
Please, Sign In to add comment