TIL

- C does not support function overloading

- the \v vertical tab character is kind of the equivalent of starting a new line and then indenting to the end of the previous line

I’m also trying to “stretch” my reading muscle. I really need to understand pointers and they look to be about 300 - 400 pages in the book so I need to read maybe a little faster and for longer each night then I’m used to.

@derickflorian pointers will need practice, even then some people find them "difficult" to feel comfortable with. My first piece of advice along that way, is the use of spacing in C that is different than what is show in books. I prefer the pointer indication on a type (the asterisk) to be near the type and not near the variable.

So use (spaces exaggerated):

int* intPtr;

and not

int *intPtr;

The first reads "type of a pointer to an integer" the second "a variable that is a pointer"

Follow

@PHolder ok, the author of the book I’m reading knows his stuff then! So far he has only introduced char*.

Now that I think about it I like the way you mentioned because int* can be easily explained as a “pointer to an int”. In my limited experience with pointers I’ve had trouble explaining and understanding what * does in plain English. Especially because it’s also used to dereference pointers and get the value they hold.

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.