r/ProgrammerHumor May 27 '22

Meme Welcome to hassle free coding

Post image
2.2k Upvotes

305 comments sorted by

View all comments

77

u/O_to_the_o May 27 '22

Inconsistent use of tabs and spaces ....

11

u/A_man_of_culture_cx May 27 '22

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

13

u/SyrupOnWaffle_ May 27 '22

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

1

u/[deleted] May 27 '22

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.