3 ms·
Yes C++ is complicated and yes students struggle with programming. It takes years to understand how to put a decent program together (separation of data, logic
by 72deluxe 10y ago
Yes C++ is complicated and yes students struggle with programming. It takes years to understand how to put a decent program together (separation of data, logic and transport etc).
As for your guesswork with C-style strings, you should have been using std::string and using copy constructors to pass work into a thread (eg. who owns the data the thread is working on?). With modern things you can move the data into the thread instead of copying it.
I would recommend students working on their own personal projects as a good pasttime as it further helps anyone understand how to write a decent program and learn the language. Also, tell them to read Stroustrup's book.
- delegate 10y agoI started programming back in the day when every programmer wrote his own String class :). Standard library was, for one reason or another, unpopular back then. Or maybe because of the C Windows API and later MFC, which came with its own CString class...
- 72deluxe 10y agoAdd to the confusion CString, BSTR and std::string and std::wstring. What could go wrong?