string
#5

Only use as much space as needed. Say your string is the following: "Hello". This string has 5 characters, so use an array size of 5 + 1. The added 1 is needed for the null-terminator.

Don't use 256 or any other random number. The input is limited to 128 + 1 characters anyway. The output to 144 + 1.
Reply


Messages In This Thread
string - by StR_MaRy - 22.10.2016, 16:42
Re: string - by Micko123 - 22.10.2016, 17:17
Re: string - by StR_MaRy - 22.10.2016, 17:21
Re: string - by Micko123 - 22.10.2016, 17:22
Re: string - by Freaksken - 22.10.2016, 17:29
Re: string - by StR_MaRy - 22.10.2016, 17:32
Re: string - by Micko123 - 22.10.2016, 17:34
Re: string - by Freaksken - 22.10.2016, 17:42
Re: string - by Micko123 - 22.10.2016, 17:43
Re: string - by StR_MaRy - 22.10.2016, 17:45

Forum Jump:


Users browsing this thread: 1 Guest(s)