cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1 MCU

Anonymous
Not applicable

Pass value as parameter:

   

Hi I have had some trouble regarding passing a value to function as a parameter.

   

This is how I am calling the function.

   

Keypad (&recievedCode);  

   

The *rCode contains zero, even though receivedCode- contains 1234.  

   

 

   

uint8 Keypad (char * rCode [100])

   

{

   

-Something. 

   

}

0 Likes
Reply
1 Reply
Esteemed Contributor II

When you declared

   

char recievedCode[100];

   

then

   

recievedCode is already a pointer, so you are passing the address of a pointer to KeyPad function.

   

 

   

Bob

0 Likes
Reply