Hello,
i have problem with converting time in string to int.
I have string="9:00-10:30" or anything else like "19:00-24:00"
and i want to get from this
int mins1 = mins of first time (540)
int mins2 = mins of second time (630)
some ideas ? I know i can get it with sscanf but i dont want to convert string time into char because this string is generated from 2d array. Also i trying getline but still i don't get right output
i know this way but i can't use it as i write... i have 2D array of strings
string arrayc[25][width]; and i when i write char s[20] = arrayc[i][5] it output error.
arrayc[i][5] = "9:00-10:30"
"array must be initialized with a brace-enclosed initializer|"
I'm sorry but I do not understand your problem. What about 2D arrays? Do you use "string" instead of "char[]"? It looks you'd better put more of your code here.