i need to say, my method isnt the correct way to read or write them, there are more and many ways to do and all finishes with the same results but i think my method is most compact and easy wait to write and read them, enjoy ;)
how to use them:
read int: GlobalVariable<int>(globalid);
read float GlobalVariable<float>(globalid);
read char*: GlobalVariable<char*>(globalid);
wirte int: GlobalVariable<int>(globalid) = newglobalvalue;
write float: GlobalVariable<float>(globalid) = newglobalvalue;
write char* GlobalVariable<char*>(gloablid) = newglobalvalue;
how to use them:
read int: GlobalVariable<int>(globalid);
read float GlobalVariable<float>(globalid);
read char*: GlobalVariable<char*>(globalid);
wirte int: GlobalVariable<int>(globalid) = newglobalvalue;
write float: GlobalVariable<float>(globalid) = newglobalvalue;
write char* GlobalVariable<char*>(gloablid) = newglobalvalue;