Disclaimer: I love C++11! It’s the best thing that happened to C++ since I’m using it (mid-90’s). I’ve been hoping for lambda‘s in C++ since I discovered and started using Lisp. Elisions and move semantics – together with unique and shared pointers – pretty much free you from thinking about memory management! It’s just amazing! Check out “Going Native” talks on YouTube, incl. amazing talks by the likes of Stroustrup, Sutter, Lavavej, et al.
If you don’t want to read my rant, here’s the point – function objects are objects – they can get copied, unless you specify otherwise, so beware that you’re working on a copy, or pass std::ref.
I’ve spend quite a bit of time these days searching for a simple way to send email from C++.
There sure is a lot of stuff on this on the Net, but there was one trouble – the program I’m writting is an NT service. Thus, all those MAPI-based solutions didn’t work for me (there are simply too many small things you have to take care of, that disable simple installation of software).
So, I just looked up “SMTP” on Wikipedia, and believe it or not, it was enough. I just wrote the whole thing as a pure plain-text communication with SMTP server, at it worked at first shot, haha!
If you’re not in mood to read all I have to say, and want just simple plain tips, feel free to skip to the end of post. 🙂
About a month ago, I was trying to set-up ICS (Internet Connection Sharing) between my computer and my wife’s laptop.
There sure are many guides on the Net about how to set all up, and what to do or not to do. Unfortunately, many of them are contradicting each other (or sometimes even themselves, haha!).
All I needed to set up was the ICS itself, no disk/file/printer sharing. Thus, most of stuff that follows won’t be useful for anyone who needs also any other kind of sharing, except of the connection to the internet. To be precise, switching off all other kinds of sharing helped me to achieve much higher stability of service.