We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello, I am trying to create an address (memory model huge) by adding an offset to a base address: void test (unsigned short offset) { unsigned char *adr; adr = 0x120000 + (long) adr; } Doing this, I get the warning 40: "'long' converted to 'huge' pointer". I can disable the warning with "#pragma warning disable = 40", so that the compiler doesn't complain, but what is the correct way to do this without producing a warning? Thanks for any help! Holger
Try: unsigned char *adr = (unsigned char *) 0x120000UL; adr += offset;
Thank you so much! It works : ) Holger