I have a code where I read a text file into a string. The string is called "line". Now I take the first element of line "line[0]" which is 3, and the second element of line "line[1]" which is 8. I want to combine them into an array called ary[0].
What I did was ary[0] = line[0] + line[1]
and expected to get "38", but instead, I got "107".
Why doesn't line[0] + line[1]
work? What is the proper way of combining the two elements? I tried strcat(line[0],line[1])
but I get an error: invalid conversion from ‘char’ to ‘char*’.