Hi there,
I have a quick question regarding c language. I cant figure out why the code would not compile. Heres the example:
Code:
typedef struct
{
// logging
uint8_t logPlace;
logLevel_t logLevel;
// RS485
scanType_t scanType;
uint8_t nrOfScans;
} flashConfig_t;
uint8_t buffer[sizeof(flashConfig_t]
flashConfig_t tempConfig;
// this compiles:
tempConfig = (flashConfig_t*)buffer;
// this does not compile (error: assignment to expression with array type):
buffer = (uint8_t*)tempConfig;
I dont understand why, its the same thing isnt it? I would apreciate all help!