Click here to Skip to main content
15,892,697 members

Comments by k5054 (Top 200 by date)

k5054 5 days ago View    
My 5
To to OP: you can confirm this by changing your printf statement to:
printf("strlen(%s) is %d\n", a, strlen(a))"
which will then print out:
strlen(abc
) is 4
k5054 29-Apr-24 18:50pm View    
void functions should not return a value.
You should also avoid "magic numbers" (e.g. MaxDateLength = 11). If you change the size of dateout you then need to find everywhere that you've used the "magic" 11. See Rick's example, where the size of the string is a #define. If you need to change the size, you only need to change the value of the #define, and recompile, and no overflows/underflows.
k5054 25-Mar-24 10:17am View    
I missed the part where you were looking for a Windows version. There's no mention of windows AFAICS on the web site, and the Wikipedia page https://en.wikipedia.org/wiki/NaCl_(software) only shows that the supported OS is "Unix Like". So it seems that it's unlikely you're going to find Windows specific source. However, the source is available. You should be able to download the tar file from the web site. I'm not up on how well Windows does with bzipped tar files, but there must be loads of solutions out there. Or you could install WSL and play with Linux inside your windows environment.
k5054 21-Mar-24 16:50pm View    
I assume you mean
formula = 5/(1+k) + 9/(2+k) + 13/(3+k) + 17/(4+k) - 16 ?
k5054 19-Mar-24 11:19am View    
I can confirm that even as far back as gcc 2.95, compilation ends in an error "too few arguments to function".