I have a PORT_NUM macro (10 digits long number)
in a server file, if i do
htons(PORT_NUM)
i get
warning: this decimal constant is unsigned only in ISO C90
warning: large integer implicitly truncated to unsigned type
whats wrong with this? (2 Replies)
In the book "The C programming language"; second edition, chapter 2.7 there is a snippet which is supposed to:
"convert a string of digits into its numeric equivalent".
int atoi(char s)
{
int i, n;
n = 0;
for ( i = 0; s >= '0' && s <= '9'; ++i)
n = 10 * n + (s -... (4 Replies)