Few questions about initialization and lambda in c++
I used clang3.3 with netbeans on linux. All in C++11. And I have a
question about initialization
int main()
{
int i();
}
The following code is compiled but not work properly. This value will not
defined by debugger and cannot be printable. I wanted describe int with
default value. Instead I can write "int{}" and it will be a perfect
default initialization. But I want understand what I wrote here, just
want.
Second question. Its about lambda. I want to know how lamda can be
described without auto keyword.
auto lambda = [&]()mutable->int{};
Simple, what I can write here instead auto and compiler will not give me
an error ? I just want understand.
No comments:
Post a Comment