Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int_sorted::int_sorted(const int *source, size_t size):sint_buffer(0){
- if (!check_sorted(sint_buffer)){ // return if already sorted
- int_buffer tmp(source, size);
- for (int *i = tmp.begin(); i != tmp.end(); i++) // loop through int_buffer
- insert(*i); // insert into to-be sorted buffer
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment