Share via


const_seg

#pragma const_seg( ["section-name"[, "section-class"] ] )

Specifies the default section for constant data. The data_seg pragma has the same effect but works with all data. You can use this pragma to put all your constant data in one read-only section.

#pragma const_seg( "MY_DATA" )

causes constant data allocated following the #pragma statement to be placed in a section called MY_DATA.

Data allocated using the const_seg pragma does not retain any information about its location.

The second parameter, section-class, is included for compatibilty with versions of Visual C++ prior to version 2.0, and is now ignored.