"assignment from incompatible pointer type"

This is a discussion on "assignment from incompatible pointer type" within the C Programming forums, part of the General Programming Boards category; Hello to all, Need help with an error "assignment from incompatible pointer type" heres the code: Code: typedef struct { ...

  1. #1
    Registered User
    Join Date
    Feb 2008
    Posts
    77

    "assignment from incompatible pointer type"

    Hello to all,

    Need help with an error

    "assignment from incompatible pointer type"

    heres the code:

    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
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,484
    struct DPCell and DPCell are 2 different things in C
    you have no struct DPCell defined in your code

    use
    Code:
    typedef struct DPCell  { char rowChar ...
    to do so
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

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, 05:42 PM
  2. Replies: 5
    Last Post: 04-04-2009, 04:45 AM
  3. warning: assignment from a incompatible pointer type
    By enderandrew in forum C Programming
    Replies: 8
    Last Post: 09-22-2007, 05:07 AM
  4. Replies: 5
    Last Post: 08-12-2007, 06: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

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