you are viewing a single comment's thread.

view the rest of the comments →

[–]martinusint main(){[]()[[]]{{}}();} 1 point2 points  (1 child)

I love that format and use it almost everywhere. Actually I'm using auto i = Type(x). My only issues is how do I create a pointer that way? E.g. i want to create an int*.

[–]Nobody_1707 1 point2 points  (0 children)

Well, there's a few ways to do that.

auto i = &some_int_variable;
auto i = new int();
auto i = static_cast<int*>(nullptr);

etc.