I have dynamically created a structure of type SiteStruecture using calloc.
struct SiteStructure
{
int numOfSect;
double easting;
double northing;
CString siteCodeStr;
CString prdPath[6];
CString prdNames[6];
double eIRP[6];
int angle[6];
SiteStructure * nextSite;
}
when I try to assign values to the siteCodeStr, which is a CString I get an assertion error, something like the CString is null or something. When I try to assing the doubles or ints, I have no problem. And I don't have any problems if I create a SiteStructure on the stack (not dynamically) and try to assign values to it. Does any one have a clue as to what is going on? Please help. Thanks in advance. [sig][/sig]
struct SiteStructure
{
int numOfSect;
double easting;
double northing;
CString siteCodeStr;
CString prdPath[6];
CString prdNames[6];
double eIRP[6];
int angle[6];
SiteStructure * nextSite;
}
when I try to assign values to the siteCodeStr, which is a CString I get an assertion error, something like the CString is null or something. When I try to assing the doubles or ints, I have no problem. And I don't have any problems if I create a SiteStructure on the stack (not dynamically) and try to assign values to it. Does any one have a clue as to what is going on? Please help. Thanks in advance. [sig][/sig]