Can anyone tell me if there is a function of simply converting character array to a short int?
For example.
char array[4]={'0','2','f','f'};
to short int 767?
I think that it is your assignment. There is no such standard function in C/C++.
Last edited on
His character array is not zero-treminated. So it can not apply strtol function..
Last edited on