CtCI-6th-Edition-cpp
CtCI-6th-Edition-cpp copied to clipboard
sort function doesn't look right in Check_Permutation.cpp
Is it just pseudo code?
Should the void main
be removed in the function below?
void main std::wstring sort(const std::wstring &s)
https://github.com/careercup/CtCI-6th-Edition-cpp/blob/c183b22fae922211a9fe460cb883b31433805b58/Ch%201.Arrays%20And%20Strings/2.Check%20Permutation/1.Check_Permutation.cpp#L5
wstring
doesn't have a member named toCharArray
on line 7.
If not, how do you compile the file?
Thanks,
@KrishMunot What's the reason to close this?
It looked good to me when I last compiled the program. However, your issue seems to be valid.
Sorry for looking over the issue. You may send a new PR with suggestions to improve the code.
Could you provide the compile instruction for the project or the file? What compiler did you use and what was the version of compiler?
Thank you!
I don't remember the specs of the compiler that I used to compile the program (It was a long time ago and have been switching machines lately) I would recommend you to compile it in any gcc compiler of the latest version available.