| ??? 02/05/09 03:09 Read: times |
#162080 - I Think it is this Responding to: ???'s previous message |
I Think it is uchar *transmit_bytes[]
try uchar *transmit_bytes I Think it is not valid, but If I am wrong some one will correct me. Remember the syntax for pointers and arrays are mostly the same. assuming: uchar *transmit_bytes; transmit_bytes = &valid_data; // pointers do not allocate storage X = *transmit_bytes; X = transmit_bytes[0]; X gets the same value the compiler is happy either way The same is true if: uchar transmit_bytes[8]; // array do allocate storage X = *transmit_bytes; X = transmit_bytes[0]; X gets the same value the compiler is happy either way But while you can assign an address to a pointer uchar array[8]; uchar stuff[8]; uchar *pointer[8]; pointer = stuff; // OK pointers are a variable address pointer = &stuff[0]; // OK pointer = &stuff[4]; // OK array = stuff; // NOT OK arrays are based from a fixed address that the compiler determines. array = &stuff[0]; // NOT OK array = &stuff[4]; // NOT OK Hope that is some what clear ( And Correct) |
| Topic | Author | Date |
| dynamic parameters in an I2C definition possible? | 01/01/70 00:00 | |
| how about | 01/01/70 00:00 | |
| trans_byte buffer? | 01/01/70 00:00 | |
| something like: | 01/01/70 00:00 | |
| Updated, but errors on my part | 01/01/70 00:00 | |
| This | 01/01/70 00:00 | |
| I must be stuck on stupid | 01/01/70 00:00 | |
| I Think it is this | 01/01/70 00:00 | |
| Array of pointers to characters | 01/01/70 00:00 | |
| Try this code | 01/01/70 00:00 | |
| Works great!...One question though | 01/01/70 00:00 | |
| The warning is real | 01/01/70 00:00 | |
| Not exactly as I coded | 01/01/70 00:00 | |
Update......Problem solved | 01/01/70 00:00 |



