I am still suffering with pointers.
// main
// functon in other fileCode:int index = 50; char* flagx = mytable_get_flag(conn, index); printf("flag=%s\n", flagx);
I am getting warning: "return makes pointer from integer without a cast" at return retval in function.Code:char* mytable_get_flag(DBconn* conn, int index) { int retval = 0; // some code if (DBrows(result) > 0) retval = *DBgetvalue(result, 0, 0); return retval; }
How would I get my char* out to print value of this string in main?