Re: GHashTable insertion problems (string literals, c_str(), etc.)



Hi Edward!
Is there a particular reason to why you, as a C++ programmer, want to use GTK+ and glib? IMHO, you should probably use STL and gtkmm. In that way you'd avoid many problems like this.

edwardt wrote:

Is there anyway I can store in / GHashTable takes in strings as **string literals** ? The issue I come across when after I insert two of these types of objects, and I run g_hash_table_foreach(), then the loop keeps on repeating itself infinitely, I believe because of something due to using c_str() as the key.





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