#p1 a logical condition?
22 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.
@azure prawn
Your message appears to contain screenshots but no code. Please send code and error messages in text instead of screenshots if applicable!
No you dont, C does implicit type conversions
p1 is just a pointer to the first element in the array.
*(p1+1) would be the second and so on.
*(p1+1) is the same as doing p1[1]
hope this helps
i wouldn't call it array. p1 is a pointer to some block of memory.
arrays as types are different
I'm just trying to keep it more simple for @azure prawn
void* can be converted to any pointer type.
i'd argue that would hurt them later. i get where you're coming from - but i personally feel that 'arrays are pointers' misconception comes from stuff like these sayings
yes.
does it mean if(any numer)f is always true
?
if (x) means if (x != 0)
how is this tree entered ? i dont get the condition
in case of pointers, it checks if the pointer is not a null pointer
if(p1) is the same as if(p1 != NULL)
yea