Follow

@Chuculate@niu.moe I need a one character out of a string. This is just me testing how to do it.
printf(&text_input); would print the entire string.

· · Web · 2 · 0 · 0
@matrix Iâm wondering about how it would handle non-null-terminated strings. :)
@matrix @Chuculate
You're passing a *Char to printf, which is essentially a string in C.
@matrix @Chuculate
Try passing it a char instead, if you want to print one
@matrix @Chuculate
&foo[n] equals &(*(foo + n)), which equals foo + n.
Sign in to participate in the conversation
Game Liberty Mastodon

Mainly gaming/nerd instance for people who value free speech. Everyone is welcome.