Must pixmap object be global and defined to = NULL initially??? Any more elegant solution?

scribble.c in GTK+ tutorial shows use of pixmap.

Why must GdkPixmap* pixmap = NULL be among
first lines of program??? Is there anyway to avoid
having this be global?? What about in C++??
I'm using C bindings (normal GTK+ in C++) not GTK++/GTKmm.

I like elegance and global variables don't seem too elegant.
Correct me if I'm wrong.


| Dr. Christian Seberino  || (619) 553-7940  (office) |
| SPAWARSYSCEN 2363       || (619) 553-2836  (fax)    |
| 53560 HULL ST           ||                          |
| SAN DIEGO CA 92152-5001 || seberino spawar navy mil |

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