Run Code
|
API
|
Code Wall
|
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
MemCpyClass
ww999
Aiutttt
Expected types
CheckSymbolBalance
Amisha
replace_if-30-Seconds-of-C++
HashTabFold
Using c++11 range-base for loop
shell sort