I've tried this piece of code in my VSCode, and theoretically the output should give me the function's address
#include<iostream>
using namespace std;
int getNumber(){
return 9000;
}
int main(){
cout<<getNumber<<endl;
return 0;
}
Once I run the code in VSCode, the output is: 1
So I asked my friend to run the exact same code on Visual Studio (since I don't have VS), and the output is a memory address.
My question is,
- Why is the output of that code is different when run in VSCode and VS?
- What should I do to be able to get the function's address in VSCode using that exact same code?