am trying to make a program, in which the user has to input into different sizes char[] arrays. I am allowed to use string.h stdlib.h iostream libaries. how can I check if user input is bigger then Max size-1(to save place for /0), without asking first what the size and avoiding overflow crash. thank you
I tried to look up different things but they seems pretty complex to something that doesn't sound very complex, realized I can't use strings because it is in the string library
You can read characters one-by-one and count the characters read.