Build error no C2297

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • su817200
    New Member
    • Apr 2010
    • 13

    #1

    Build error no C2297

    Dear Friend,
    I got the following build error

    error C2297: '*' : illegal, right operand has type 'unsigned long *'

    register unsigned char *outof;
    register unsigned long *into;

    *into |= (*outof++ & 0xffL) << 16;

    Please help me ....
    Rgds,
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    I have no idea why you are getting this error. The code compiles OK as either C or C++ using Visual Studio.NET 2008.

    Comment

    • donbock
      Recognized Expert Top Contributor
      • Mar 2008
      • 2427

      #3
      Try taking out the register type qualifiers.
      Try changing 0xFFL to 0xFFuL.

      Comment

      • Banfa
        Recognized Expert Expert
        • Feb 2006
        • 9067

        #4
        Rather than just posting the lines of code you think are the problem you might want to try posting the entire function or at least more of it if it is very long.

        Is either into or outof a #defined macro?

        Comment

        Working...