0
why did the main pointer display 1? What this means?
#include <iostream> using namespace std; int main() { int score = 5; int foreva = 6; cout << &main << endl; return 0; }
2 Respuestas
+ 2
This talks about it.
https://stackoverflow.com/questions/2064692
+ 1
1. There's no pointer in that code (& is address-of, a pointer is a variable).
2. You're _trying_ to get the address of main().
3. [Edit] Turns out it's legal-ish, but pointless because it gets re-cast to a bool so any function will be 1[/edit]