Converting char array to an int array in c++ -


i have char array containing 3 2 4 56 1. need perform sorting function on elements of array (i have arrange them in ascending order), can't unless numeric. how can convert array int array?

actually, char array numeric:

char nums[] = {1, 5, 2, 6, 0};  std::sort(std::begin(nums), std::end(nums));  (auto = std::begin(nums); != std::end(nums); ++it)     printf("%i ", *it); 

Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -