i have been trying to get the address of a function and use that hex number for other calculations. I have read that you cannot get the address of a function like you get the address of a variable in c/c++. I have tried casting to `void*` and function pointers but none of them seems to be working. As I get different numbers everytime I try to assign the address to a variable or pass it to a function or use it in any way. int main(){ std::cout<<&funct<<std::endl; } //Output is: 0x010111b3 But when I look at the disassembly the function starts at 0x01012580. And the difference is not constant. It might be a compiler issue but i don't know how to fix it. Can anyone help me please? Thanks