This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

c code HELP!

plz. everyone give advice now.


void calibrateInput ( int i )
{
  doJob1 ( i );

  doJump ( i );

  doPeter ( &i );

  doMary ( &i );
}

Parents
  • Sorry, but you must have forgotten to post the relevant code. There are not variable named "it", so there is no way we could know the data type for the "it" variable.

    If the parameter sent to the function is int or unsigned char is irrelevant. The compiler will upgrade the unsigned in to an int.

    If the doPeter() and doMary() functions takes a pointer to unsigned char instead of pointer to int, the compiler would have caught the error directly - you do use function prototypes, don't you?

    Do you often request help with code sections you have forgotten to post?

Reply
  • Sorry, but you must have forgotten to post the relevant code. There are not variable named "it", so there is no way we could know the data type for the "it" variable.

    If the parameter sent to the function is int or unsigned char is irrelevant. The compiler will upgrade the unsigned in to an int.

    If the doPeter() and doMary() functions takes a pointer to unsigned char instead of pointer to int, the compiler would have caught the error directly - you do use function prototypes, don't you?

    Do you often request help with code sections you have forgotten to post?

Children
No data