1
Discussion - MCU / Re: Opportunities of implementing MQTT and their benefits
« on: July 29, 2020, 06:42:57 PM »
Hello,
yeah I know this but the question is: Why there is a typecast needed?
In arg there are strange numbers.
Why can't I just let the pointer uninitialized like:
struct sub_info *subInfo;
subInfo->topic = TOPIC_CONTROL;
Is it because in arg is the adress of the pointer on the heap? And pointers need to have an address where they point to?
yeah I know this but the question is: Why there is a typecast needed?
In arg there are strange numbers.
Why can't I just let the pointer uninitialized like:
struct sub_info *subInfo;
subInfo->topic = TOPIC_CONTROL;
Is it because in arg is the adress of the pointer on the heap? And pointers need to have an address where they point to?