Click Here for the snapshot of my problem.

    string operand;
    string opCode;

   struct MacroNameTable{
       string macroName;
       int start;
       int end;
       int invocation; 
       string operandCounter;      

struct MacroNameTable NAMTAB[NAMSize];  

      void addNAMTab(){
            cout <<"check NAMcounter: ["<<NAMcounter<<"]"<<endl;//debug
            cout <<"check this operand: ["<<operand<<"]"<<endl;//debug
            cout <<"check this opCode: ["<<opCode<<"]"<<endl;//debug


operand and opCode will read from text file. As you can see from the snapshot, after read from file,
current operand="&INDEV, &BUFADR, &RECLTH"
current opCode="RDBUFF"

this line cause a problem , it gives me runTime error


but if i change to


then it is working again. Click Here

why ?? I've debug whole day long and I still cannot solve this, it supposed to be working because opCode is string , so does NAMTAB[NAMcounter].macroName

i just found out the problem, close topic

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.