error dont know

This is a discussion on error dont know within the C Programming forums, part of the General Programming Boards category; what the meaning of the error below: assign1.c: In function `main': assign1.c:227: invalid lvalue in assignment i dont know what ...

  1. #1
    khan3
    Guest

    error dont know

    what the meaning of the error below:

    assign1.c: In function `main':
    assign1.c:227: invalid lvalue in assignment

    i dont know what to do!

  2. #2
    ggs
    ggs is offline
    C > C++ duders ggs's Avatar
    Join Date
    Aug 2001
    Posts
    435
    x + y - 10 = z;

    ^^ that's a bad lvalue. with assignment expressions in the form x = y, x has to resolve to a single variable address. you can't do fancy math on that side.
    .sect signature

  3. #3
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    Post that line (227) and we can help you spot the error (unless you figured it out already).
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21