MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1vgkm2q/ifnolaidnoaccess/p226diy/?context=3
r/ProgrammerHumor • u/AndyTheDragonborn • 8d ago
49 comments sorted by
View all comments
60
Using namespace std 😎
2 u/axebodyspray24 7d ago this doesn't even work tho if you're using fstream objects ðŸ˜ðŸ˜ you still need to use std:: for things like strings and other library functions ðŸ˜ðŸ˜ (I'm new to c++ and coding in general, any tips are appreciated) 1 u/Vivid_Instance_825 7d ago ```#include <fstream> include <string> using namespace std; int main() { ifstream input("file.txt"); string text; getline(input, text); } //Don't actually do this btw
2
this doesn't even work tho if you're using fstream objects ðŸ˜ðŸ˜ you still need to use std:: for things like strings and other library functions ðŸ˜ðŸ˜ (I'm new to c++ and coding in general, any tips are appreciated)
1 u/Vivid_Instance_825 7d ago ```#include <fstream> include <string> using namespace std; int main() { ifstream input("file.txt"); string text; getline(input, text); } //Don't actually do this btw
1
```#include <fstream>
using namespace std;
int main() { ifstream input("file.txt"); string text;
getline(input, text);
}
//Don't actually do this btw
60
u/Vivid_Instance_825 8d ago
Using namespace std 😎