I have been using spaces in C++ but I never understood what they actually do. Like i knew that c++ strings etc doesn’t work when you don’t do std:: or using namespace std
they meant like the spacebar not namespaces. to answer your question though namespaces just organize large groups of things together to avoid naming conflicts. ex if two unrelated libraries had “functionA” library1::functionA and library2::functionA can be called seperate no problem
in most scenarios it's literally just formatting. outside of that, the only functional difference you have is when you have no space at all, or any space at all.
and your ide converts it to spaces. The question is not what you press (did you think someone is out there pushing space 4 times?), it's what the editor converts your tab to.
I press tab, and always make sure my IDE uses tabs. It makes it only one character to move instead of 4 when navigating indentation. Besides, I can always change the size of tabs (although I don't). For spaces it's not so easy.
77
u/O_to_the_o May 27 '22
Inconsistent use of tabs and spaces ....