Sizeof(char) is 1
drj11.wordpress.com
Sizeof(char) is 1
1–10 of 55 posts
Re: Sizeof(char) is 1
#2Re: Sizeof(char) is 1
#3Really, these sort of things are probably good in code: they make it explicit that you are dealing with char's, and not some other datatype. If left out, it may look like a bug, causing debugging hassles.
Re: Sizeof(char) is 1
#4Because that sounds suspiciously like "potentially exploitable" to me.
Re: Sizeof(char) is 1
#5Re: Sizeof(char) is 1
#6It's like when people define a 64MB buffer as something like:
#define BUFSIZE (64 * 1024 * 1024);
Even though you could've written 67108864, the former is far more comprehensible.
Re: Sizeof(char) is 1
#7Is this really important? Sure, the source may be slightly polluted, but it's not going to slow down the application once it's compiled. Really, these sort of things are probably good in code: they make it explicit that you are dealing with char 's, and not some other datatype. If left out, it may look like a bug, causing debugging hassles.
Re: Sizeof(char) is 1
#8Re: Sizeof(char) is 1
#9Is this really important? Sure, the source may be slightly polluted, but it's not going to slow down the application once it's compiled. Really, these sort of things are probably good in code: they make it explicit that you are dealing with char 's, and not some other datatype. If left out, it may look like a bug, causing debugging hassles.