actually, I was thinking arbitrary that i should make my own sizeof function. till date, i have made many many my own C functions which are also defined in C libraries. but i got strucked in sizeof operator desiging. can anyone give me hint how to start with this ? i am not aksing code as per rules of daniweb.
nitin1 15 Master Poster
Recommended Answers
Jump to Postcompile type operator ?
Compile time operator. It means that the compiler already has all of the information it needs while compiling the code. The vast majority of this information is discarded by the time the code actually runs, which puts you at a significant disadvantage when trying …
Jump to PostI've been taught in my freshman class that
sizeof
was a function, or at least it was persistently addressed as such, and I didn't really know any better at the time. I think he is under the same boat.
sizeof
is not a function, but is more of an operator. …
Jump to PostConsider
sizeof
to be similar to#define
. It is created during compile, not while running.From http://en.wikipedia.org/wiki/Sizeof#Implementation
"In most cases, sizeof is a compile-time operator, which means that during compilation sizeof expressions get …
All 11 Replies
deceptikon 1,790 Code Sniper Team Colleague Featured Poster
nitin1 15 Master Poster
deceptikon 1,790 Code Sniper Team Colleague Featured Poster
asrockw7 18 Junior Poster in Training
nitin1 15 Master Poster
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague
nitin1 15 Master Poster
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague
deceptikon 1,790 Code Sniper Team Colleague Featured Poster
nitin1 15 Master Poster
deceptikon 1,790 Code Sniper Team Colleague Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.