Re: getting text



As I am trying to write clean and profound code, i just would like to 
ask if this is a quite often used technique for solving this kind of 
problems (i have always been taught that global vars are *bad*).  If 
not, then what is the 'clean' technique to solve my problem?

When the globals are used to store the same value for the entire
execution of the program they are not too bad.

An alternative solution is to package them all up in a malloced struct
and pass that back to each callback as user data.  More sphisticated
techniques include structures per window, or specific structures per
calback.

        Regards,
        nash


-- 
Brett Nash <nash nash nu>
Sometimes it's better to light a flamethrower than curse the darkness.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]