| ||||||||
Technical Support Support Resources Product Information | C251: PUTTING TABLES IN HCONSTQUESTIONHelp. I need to create a string table in HCONST in my 251 program. I need my program to run in X-Tiny memory model by default. How do I do that? ANSWERCreating a table of strings in HCONST is easy to do. The following code will help you get started:
const char far str1 [] = "This is string 1";
const char far str2 [] = "This is string 2";
const char far str3 [] = "This is string 3";
const char far * const far junk [] =
{
str1, str2, str3,
};
In this example, the strings str1, str2, and str3 are stored in HCONST (the const char far does that). The array junk is an array of pointers to const char far things (str1, str2, and str3). To make junk live in HCONST, you must also put the const far in front of junk. Last Reviewed: Thursday, May 20, 2004 | |||||||
| ||||||||