thebaselab / codeapp

Building a full-fledged code editor for iPad
https://code.thebaselab.com
MIT License
2.95k stars 202 forks source link

Hope C++ can support #include <bits/stdc++.h> #261

Closed andyli0123 closed 1 year ago

andyli0123 commented 3 years ago

Hope C++ can support #include <bits/stdc++.h>

lampardnk commented 2 years ago

Agree, this is an extremely useful and common library for competitive coders

bummoblizard commented 2 years ago

bits/stdc++.h is a non-standard header file and therefore not included in the clang compiler. You should include individual headers manually.

Unfortunately, this is a lazy hack, naming a GCC internal header directly instead of individual standard headers like <string>, <iostream> and <vector>. It ruins portability and fosters terrible habits.

From https://stackoverflow.com/questions/31816095/why-should-i-not-include-bits-stdc-h

If you really need this header, you can follow the guide here (https://stackoverflow.com/questions/28994148/how-can-i-include-bits-stdc-in-xcode) to create your own header file.

bummoblizard commented 1 year ago

https://github.com/thebaselab/codeapp/commit/b56a76ec58bd9688227676b17fdbb89550723648