Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
test if nullptr
//g++ 5.4.0 #include <iostream> int g = 1; int* foo() { return &g; } int* bar() { return nullptr; } int main() { if (const auto& fooRes = foo()) { std::cout << "fooRes not null\n"; } if (const auto& barRes = bar()) { std::cout << "barRes not null\n"; } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
project
BinSearch
Faaaaak
cppPySuper
MinCostKStops_DFS
PRIx64 on gcc
derive* -> gcc
inheritance
Exempel 2
pointconcat
Please log in to post a comment.