View Full Version : Gtkmm question
December 26th, 2006, 09:28 PM
For some reason, I am not able to use normal C datatypes in Gtkmm. For example, char* has to be ustring and short has to be guint16. Which header must I include to in order to use ustring, guint16, and the like?
December 26th, 2006, 11:49 PM
You cant I dont believe. The C datatypes are only for regular GTK, GTKMM uses different ones and the C ones are not compatible with C++.
December 26th, 2006, 11:53 PM
You sure about that? I've always been able to use int, unsigned int, unsigned char, etc in C++. I'm talking about the API specific datatypes of gtkmm.
Should I just include glib.h?
December 27th, 2006, 01:02 AM
Well not the standard data types, but the custom ones created by the GTK library. like gint for C and stuff. Those dont work in C++ as far as I know. Try glib.h I suppose. Never tried using glib.h but worth a try.
December 29th, 2006, 09:33 PM
I included "glibmm.h" instead and everything worked fine.
However, I have one more question.
How do I assign a formatted string to a glib::ustring object? I've tried assigning a formatted string of formatted gchars to a glib::ustring, but that doesn't seem to work.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.