Skip to main content
6 events
when toggle format what by license comment
Jul 16, 2017 at 12:46 comment added Samson Ahh ok. I will investigate when I can, i am finding it quite intriguing. It might be fixable by messing with compiler options.
Jul 16, 2017 at 9:57 comment added rustam Shirinov I tried to compile the above code with g++ and it gave me the correct address of the function. The Problem IS my compiler. but i dont know how to fix it :)
Jul 16, 2017 at 9:37 comment added Samson Thats strange. I think its your compiler? Maybe. What does visual c++ use?
Jul 16, 2017 at 9:30 comment added rustam Shirinov i copied the exact same code that you posted to my machine, compiled it with visual c++ and set a breakpoint at the cout statement. When i hover over the value of &function it gives me the correct address of starting point of function which is 0x01341720(i looked it up in the visual studio debugger). But when i continue it prints out the value 0x01341334 which is incorrect.
Jul 16, 2017 at 4:38 history edited Samson CC BY-SA 3.0
added 335 characters in body
Jul 16, 2017 at 4:25 history answered Samson CC BY-SA 3.0