working on a dns client and i need to save the length of the domain before each of them..
so here's the code i wrote
tmp = strtok(hostname,".")
length = strlen(tmp);
query[currentIndex++]= (char) length;
}while (tmp = strtok(NULL,"."))
now i get the domain in there except for the lengths
for example ..
if i input www.google.com
i get _www_google_com rather than 3www6google3com
the "_" are spaces..
any help would be appreciated