This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

reference to next address in C. How to implement it?

Please.
I try to write in C my old assembler program amd dont know how to overcom the next.

In assembler it is possible to write
label_A: ; ....any... dw label_A ; dw label_B ;
label_B: ; ....any...

But in C the equivalent code char code item1 [ 17 ] = "aaa"; void* code ref1 = &item1; void* code ref2 = &item2; char code item2 [ 17 ] = "bbb";
gives Error C202 'item2': undefined identifier

Would somebody direct me?
Thanks in advance.
Yury.

Parents
  • It is me again.
    I found a wrong outlook of my message
    try:

    In assembler it is possible to write
    label_A: ; ....any...
             dw label_A ;
             dw label_B ;
    label_B: ; ....any...
    
    But in C the equivalent code
        char  code item1 [ 17 ] = "aaa";
        void* code ref1         = &item1;
        void* code ref2         = &item2;
        char  code item2 [ 17 ] = "bbb";
    gives Error C202 'item2': undefined identifier
    

    Would somebody direct me?
    Thanks in advance.
    Yury.

Reply
  • It is me again.
    I found a wrong outlook of my message
    try:

    In assembler it is possible to write
    label_A: ; ....any...
             dw label_A ;
             dw label_B ;
    label_B: ; ....any...
    
    But in C the equivalent code
        char  code item1 [ 17 ] = "aaa";
        void* code ref1         = &item1;
        void* code ref2         = &item2;
        char  code item2 [ 17 ] = "bbb";
    gives Error C202 'item2': undefined identifier
    

    Would somebody direct me?
    Thanks in advance.
    Yury.

Children