Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
That's kind of a bad practice when using many namespaces as functions can overlap and you won't know which libs functions you're calling.
-
D--M22687yIirc compilers will just look for a file that has a "main" function defined in it
Ps. Fuck whoever wrote that code. INCONSISTENT INDENTATION. -
okkimus19697y@D--M
+ A little piece inside me dies always when I see opening curly bracket on new line... :( -
@D--M Mate, you might want to look at that file name. (.java)🤐
About indentation, some professor gives us 200 lines of codes unindented as questions on a regular basis in exams. No wonder some students have picked it up and consider it the way to write code. -
@2erXre5 it's weird the number of people who understood this is so low. Thankyou 🙏
-
D--M22687y@abhinavr888
So are you writing java? Or c++, cause that looks like c++ to me, in which case, having a file called pineapples.java would still work and compile as c++ -
@abhinavr888 Yeah. BTW are you from which college? Am also from the same country that you belongs to.
-
I just don't understand coders who don't put spaces between their operators. I mean, how do you manage to read that shit?
-
bioDan61597yI dont understand the TIL.. iostream is maybe the most common C++ library.
Its just some shitty C++ code with a bad filename. But i enjoy the free code review it gets in the comments. -
Want to know what really triggers me about this code? He isn't putting a space between cout << "String".
AAAAHHHHHHH -
@ilikeglue "using namespace" is fine in .cpp files. Just if one overlap happens you should remove all "using namespace" for consistency.
But please, PLEASE don't use it in Headers.
Pllllleeeeaaaaaassssseeee! -
@D--M Well I had no idea you could write C++/C code in a .java file. And neither did the person who wrote this. Hence, the joke.
How do you compile such a file? Javac filename? -
@bioDan well devRant won't let you post without a minimum 6 characters. Added gibberish really
TIL you can write this 🙇🙇
joke/meme