yes i read the man and i know that is suggested not to use this function. Although i just use it for demonstration for pointers.
That i didn't do is to check the header files. The other thing is that i am total newbie to man 3 and i need some time to get used to it, so please be patient. i see that the usage of external functions are more far than a medium level of Basic programming but i think i can manage it in time. On Sun, 2011-01-09 at 21:37 +0100, Benoît Minisini wrote: > > so what can i do for > > > > char *getwd(char *buf); > > > > ? > > > > You must know C programming first, and understand how getwd works. By typing > 'man getwd', you will learn that you must not use that function, it is > dangerous and so deprecated. > > Then you will read that buf must be a pointer to a memory allocation of > PATH_MAX bytes. You must find the value of this constant inside the standard > C > header files. > > SizeOf(gb.String) is 4 (on 32 bits system). It is the number of bytes used by > Gambas to store a pointer to a Gambas string. This is the reason why you get > a > crash. > > Regards, > -- Regards, Demosthenes ------------------------------------------------------------------------------ Gaining the trust of online customers is vital for the success of any company that requires sensitive data to be transmitted over the Web. Learn how to best implement a security strategy that keeps consumers' information secure and instills the confidence they need to proceed with transactions. http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user