S
Steffen Fiksdal
Can somebody please give me some rules of thumb about
when I should be using size_t instead of for example int ?
Is size_t *always* typedef'd as the largest unsigned integral type on all
systems ?
I know that the strlen() functions and such returns a size_t,
and it should be received that way.
I am at the time creating some sort of cryptolibrary. Should all my
API methods use size_t parameters instad of for example int parameters,
and why ?
And..Should I bother using size_t other places than when stdlib functions
need/return then in my library? (If yes, why?)
I bother because my code now works on linux,sun solaris and windoze (32
bits), and I don't want strange problems running it on 64 bit
architectures.
Best regards
Steffen
when I should be using size_t instead of for example int ?
Is size_t *always* typedef'd as the largest unsigned integral type on all
systems ?
I know that the strlen() functions and such returns a size_t,
and it should be received that way.
I am at the time creating some sort of cryptolibrary. Should all my
API methods use size_t parameters instad of for example int parameters,
and why ?
And..Should I bother using size_t other places than when stdlib functions
need/return then in my library? (If yes, why?)
I bother because my code now works on linux,sun solaris and windoze (32
bits), and I don't want strange problems running it on 64 bit
architectures.
Best regards
Steffen