Hi
I am currently writing an IMGUI implementation and I need to create an unique ID for each widget. I thought about using the Instruction Pointer (Program Counter) since it will be the same and be unique everytime I get to the same line of code.
But I don't know that much about assembly that I can inline and get it read. I googled this but it does not compile in VS2010:
void *ip = 0;
asm("movl %%eip, %0" : "=r"(ip) );
Does it seem like a good idea to generate unique IDs like this? And can someone help me get the asm working?
Cheers!