[09:08] <faizul> hi
[09:24] <faizul> hi hyperair 
[09:24] <hyperair> hi
[13:23] <excalibr> hyperair: o/
[13:24] <excalibr> how do you print out the date_string var in this code
[13:24] <excalibr> https://github.com/GNOME/gnote/blob/master/src/test/dttest.cpp#L71
[13:25] <angch> cout << date_string // ??
[13:27] <excalibr> why cannot use printf
[13:27] <excalibr> test/dttest.cpp:82:97: warning: format ‘%s’ expects argument of type ‘char*’, but argument 2 has type ‘std::string {aka std::basic_string<char>}’ [-Wformat]
[13:27] <excalibr> i wrote printf ("bablabla %s \n", date_string);
[13:29] <angch> because std::string is not char * ...?
[13:29] <angch> unicode and all that.
[13:33] <excalibr> ahh sorry :P
[14:58] <hyperair> excalibr: \o
[14:58] <hyperair> std::string has a different memory representation than a char*
[14:58] <hyperair> if you try to printf an std::string, things will go wrong. very horribly
[15:07] <angch> well, there's always sprintf("%s", date_string.c_str()); // Hackity hack. C++ is not C, stop mixing and matching me!
[15:07] <angch> http://www.cplusplus.com/reference/string/string/c_str/
[15:08] <angch> sorry, snprintf, etc, etc.
[15:08] <angch> rusty