Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Silly circular pointer
//g++ 7.4.0 #include <iostream> int main() { void* y; y=&y; *(int**)y=(int*)y; std::cout << (void*)y << "\n"; std::cout << (void*)*(int**)y << "\n"; std::cout << (void*)********(int*********)y << "\n\n"; // they're all the same, since y points to itself std::cout << *(long*)y << "\n"; std::cout << **(long**)y << "\n"; std::cout << ********(long********)y; // also all the same }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Pierwiastkowanie
IceCream
operator++
remove dublicates from string using recursion
2
MinCostKStops_BFS
Widget Class with dynamic memory and pointers
3 and 7 in a row
ewfgrthry
ignat
Please log in to post a comment.