Hello here is my code:
string num_s[slash_pos];
strncpy(num_s, fraction + 0, slash_pos - 0);
where slash_pos = 2, and string fraction = "11/89". I want to get that numerator string "11". I want to make it dynamic, and thus instead of assigning things as such:
num_s[0] = fraction[0] num_s[1] = fraction[1]
However I'm getting this error: incompatible pointer types passing 'string [slash_pos ]' to parameter of type 'char *
What is wrong?