|
Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
D - size within the function
hello i was just wondering something. in C you hit a dead end when you trying to get a size of arg that passed as pointer to a function. for example: char *strcpy(char *dest, const char *src) if you trying to pass a static buffer as one of these args you can't get their size within the function. most likely you will get sizeof() return as 4. i am wondering if there is a way that you can guys try make this process (getting size of pointers (dyanmic) or static within function) p.s for y`all C folks, the only way i figure how to get it is to starting walking trough the entire stack. izik http://www.tty64.org Nov 19 2001
"Izik" <izik tty64.org> wrote in message news:3BF9682A.7090901 tty64.org...i was just wondering something. in C you hit a dead end when you trying to get a size of arg that passed as pointer to a function. for example: char *strcpy(char *dest, const char *src) if you trying to pass a static buffer as one of these args you can't get their size within the function. most likely you will get sizeof() return as 4. Nov 19 2001
|