CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9

Threaded View

  1. #2
    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    3,654

    Re: Linear Interpolation C code for X and Y axis - compile errors

    Code:
    int GefMain  (T_WORD *Y0,       /* Input Param 1  */
                 T_WORD  *Y1,      /* Input Param 2  */
                 T_WORD  *Y2,      /* Input Param 3  */
                 T_WORD  *X0,      /* Input Param 4  */
                 T_WORD  *X1,      /* Input Param 5  */
                 T_WORD  *X2,      /* Input Param 6  */
                 T_WORD  *Z1);      /* Output Param 7 */
    You also have to implement it if you intend to use it (otherwise just remove it)

    Pay some attention to how you format the code, spaces and aligned {} improve the readability a lot.

    Goto isn't exactly the first thing you should think on using but anyway here are some more compilation issues:

    - The label has to be set after the variables.
    - Neither cin/cout nor << exists in plain C.
    - SPD isn't declared
    - Neither X or Y are initialized before being used
    Last edited by S_M_A; October 15th, 2012 at 02:58 PM.
    Debugging is twice as hard as writing the code in the first place.
    Therefore, if you write the code as cleverly as possible, you are, by
    definition, not smart enough to debug it.
    - Brian W. Kernighan

    To enhance your chance's of getting an answer be sure to read
    http://www.codeguru.com/forum/announ...nouncementid=6
    and http://www.codeguru.com/forum/showthread.php?t=366302 before posting

    Refresh your memory on formatting tags here
    http://www.codeguru.com/forum/misc.php?do=bbcode

    Get your free MS compiler here
    https://visualstudio.microsoft.com/vs

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured