i have a function like "GetExactMatrix(int(huge *buf_x)[250])" in older version of DOS compiler (C600). When i am trying to use the same in in C++ compiler it's not accepting the "huge *". I need a help that how can i use the same thing in C++.
Printable View
i have a function like "GetExactMatrix(int(huge *buf_x)[250])" in older version of DOS compiler (C600). When i am trying to use the same in in C++ compiler it's not accepting the "huge *". I need a help that how can i use the same thing in C++.
I don't think you need to worry about specifiying a 'huge' pointer any more. Try removing it from the function header.
To be technical, "huge" is not a C++ keyword. The compiler is perfectly correct in giving you an error when it saw the word "huge". It is the same as declaring "GetExactMatrix(int(Paul *buf_x)[250])" or "GetExactMatrix(int(Joe *buf_x)[250])" :)Quote:
Originally posted by sam_sun_401
i have a function like "GetExactMatrix(int(huge *buf_x)[250])" in older version of DOS compiler (C600). When i am trying to use the same in in C++ compiler it's not accepting the "huge *". I need a help that how can i use the same thing in C++.
Now for a practical explanation -- "Huge pointers" existed in 16-bit DOS environments, and to accommodate this, various 16-bit C and C++ compilers allowed you to use a special modifier called "huge". However, for a 32-bit OS, there is no such thing as "huge pointers", so there is no longer any need to use "huge".
Just get rid of the "huge" modifier.
Regards,
Paul McKenzie
"Just get rid of" the huge specifier may not be the best solution. What if one day you need to port it back to a 16 bits system, a low end embedded system, for example? Do you put "huge" back on one by one?
Just put something at the top of the source file to redefine "huge" to nothing, your problem will be solved.