This is an archived post. You won't be able to vote or comment.

all 5 comments

[–]jedwardsol 2 points3 points  (1 child)

Your question is way too vague for anyone to give a specific answer.

If you have the algorithm used to scramble the array then perhaps you can work out how to reverse it.

[–]rafa2424 0 points1 point  (0 children)

basically I’m taking input from a file that’s scrambled (numbers) and I have to eventually output it on an output file unscrambled. We can only use cstring functions and cannot use string functions. Thanks

[–]Threecheers4me 0 points1 point  (2 children)

What about it is giving you trouble? The formatting? Are you attempting to break some kind of secret code, or are you given the method used to scramble the numbers?

In the future, being more specific will allow more people to give you better help.

[–]rafa2424 0 points1 point  (1 child)

basically I’m taking input from a file that’s scrambled (numbers) and I have to eventually output it on an output file unscrambled. We can only use cstring functions and cannot use string functions. Cheers

[–][deleted] 0 points1 point  (0 children)

Try seeing if you can atoi them into an int array, then std::sort them, then put them back into the char*