Thread: "assignment from incompatible pointer type"

  1. #1
    Registered User
    Join Date
    Feb 2008

    "assignment from incompatible pointer type"

    Hello to all,

    Need help with an error

    "assignment from incompatible pointer type"

    heres the code:

    typedef struct { char rowChar ; char colChar ;  int Score ; struct DPCell *traceBack ; int traceBackType; } DPCell ; 
    DPArray[i][0].traceBack = & DPArray[i-1][0] ;

  2. #2
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Rishon LeZion, Israel
    struct DPCell and DPCell are 2 different things in C
    you have no struct DPCell defined in your code

    typedef struct DPCell  { char rowChar ...
    to do so
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    David J. Wheeler

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. incompatible pointer type?
    By kezman in forum C Programming
    Replies: 3
    Last Post: 04-22-2009, 04:42 PM
  2. Replies: 5
    Last Post: 04-04-2009, 03:45 AM
  3. warning: assignment from a incompatible pointer type
    By enderandrew in forum C Programming
    Replies: 8
    Last Post: 09-22-2007, 04:07 AM
  4. Replies: 5
    Last Post: 08-12-2007, 05:26 PM
  5. Could somebody please help me with this C program
    By brett73 in forum C Programming
    Replies: 6
    Last Post: 11-25-2004, 02:19 AM