Modifying element of GArray

        Good day,

        I want to improve my school projects, so i decided to represent grade
as a struct:

        typedef struct _KGrade KGrade;

        struct _KGrade {
                gchar *grade;
                gfloat real_value;
                GDate *date_entered;
                GDate *date_modified;

        Now, I'm packing these structs into a GArray, but how can I modify
value of GArray at a specified index? I can remove struct (val) at
specified index and then insert another modified at the same index, but
is there a better way? I'm using GLib 2.0.7 (maybe there is something
like >> g_array_replace_val << in GLib 2.2?).

        Thanks for help,

"This is it... This is where I belong..."

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