Thank you.
Post
Replies
Boosts
Views
Activity
@endecotp Please check the newer version of the code which I pasted above. It is free of all those things you pointed out. Please check it anywhere other than Xcode. Open terminal and you can compile it using command:- "g++ --std=c++17 filename.cpp".
@endecotp Those two lines have nothing to do with this issue as I have been using them since years. It was compiling perfectly before Xcode update. Though, you can change these lines:- first line as I mentioned above and you can completely remove the second line. This code works only in Xcode but fails everywhere else, I tried in terminal also.
To compile:-save this code in file with name solution.cpp, then go to that directory and run the command: "g++ --std=c++17 solution.cpp"
Check below code
P.S. I have tried this code in Sublime Text editor and VS code.
Please update your macOS to 12.6 and then try this code. Thank you.