Hi! I am trying to learn C++. I have a question about addition of addition of char. I have made a class called SuperInt. Look at the second last row.
In order to get what I want correct I need to take minus '0'. Note that
temp[i] should be of type int. If I take the '0' away it does not work.
Note also that the pointer q is a pointer to a char.
Does C++ typecast automatically for me in this case or? The strange thing is that
it doesnt even work when I typecase myself, but I need to write it like this.
Thanfull for answers!
1 2 3 4
SuperInt temp(teck == '-', strlen(q));
for (int i=temp.langd() -1; i>=0; i--)
temp[i] = *q++ - '0';
b = temp