Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
cref
//g++ 5.4.0 #include <iostream> struct a { a() { std::cout << "a\n"; }; ~a() { std::cout << "~a\n"; }; }; struct b { b(const a& mya) : x(mya) { std::cout << "b\n"; } ~b() { std::cout << "~b\n"; } const a& x; }; int main() { b x{a{}}; std::cout << "reference to a in b is now invalid\n"; }
run
|
edit
|
history
|
help
0
ADVENTURE CODE CSCI 40
project: bank account
CodeChef P2 - FIZZA
N Qeens problem
newwork
return reference (gcc)
Simple use of function templete and namespace
TransposeMatrix
Dar
Minimum number of jumps DP