RE: gchar to char



While gchar is defined as a char, I've run into this problem as well.
However, I've cast the gchar to a char to "fix:" the problem.  For example:

gchar cf[3] = {"100"};
float ff = 0.0;

ff = atof((const char *)cf);

As a result: ff = 100.0.

Hope this helps, good luck...





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