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
-
@novopl that depends, stdout is newline buffered, so it actually will flush on every \n
-
fdgram4867y@Crazed you're putting the entirety of the standard library into the global namespace. Why have namespaces if you're not gonna use it?
The standard library has a lot of very generic names, array, list, vector, swap, min, max, what have you. You will inevitably get collisions with other libraries and your own code.
Additionally it makes the code harder to read as you won't know where a function or class comes from. Is this a std vector? Or a geometrical vector? -
Crazed20507y@fdgram ah ok, see I'm web dev so i wasn't actually sure how the namespace thing worked lol. Essentially its like including jquery for a single finction then
-
fdgram4867y@Crazed nope. More like throwing all your plates and cutlery around the entire house instead of keeping them nicely isolated in the cupboards and drawers.
Related Rants
#include <iostream>
using namespace std;
int main() {
cout << "Hello world" << endl;
}
If it works, It's time for a coffee break!! :)
undefined
wk70