« first day (1422 days earlier)      last day (1436 days later) » 

9:24 AM
stringstream ss(sentence);
string word;
while(ss>>word){
the sentence is exatly what you think it is
my question is how does c++ know what a word is when extracts it from the stream?
 
it's just how operator>>(istream, string) is defined
 
yes but how does it know that word isnt a character?
 
how does it know that word is a word?
 
std::isspace
 
9:30 AM
@PeterT omg that is hard to read!
 
it's for reference, it needs to be precise and short, not easy to read :P
the site is called cppreference, not cpptutorials, hehe
 
Hey guys, do we have a chat room for docker enthusiasts?
 
@PeterT ive read this many times and still cant understand it
 
it reads the next character until the next character returns true for std:isspace(c) for the current locale
 
Umm.. guys? I really need help. If we don't have one, I will create one for the community. Please help
 
9:39 AM

Docker

Ask your Docker questions and somebody will respond later if t...
 
Thanks :)
 
@PeterT thanks, on the seventh reading i now understand
@PeterT is there any rule of thumb as to when parameters should be passed by pointer or by reference? same goes for the return type of functions
 
I'd say just use references when possible, if not look if there's some ownership implication and use a smart-pointer in that case, if neither applies use a raw pointer
I guess if it's nullable you might want to use a pointer sometimes, since std::optional<std::reference_wrapper<T>> might seem weird to people
 
 
11 hours later…
8:27 PM
Hi guys, I need help with binarySearch with an array of strings
 
 
1 hour later…
9:54 PM
> char* card = "4388576018402626";
Will this be null terminated automatically?
Nevermind.
 

« first day (1422 days earlier)      last day (1436 days later) »