A list of puns related to "Bjarne"
Has anyone taken a CS course with this professor? I'm planning on taking his design using C++ course next semester, but I'm trying to decide between this class and another CS course taught through Barnard to fulfill the CS requirements for my track.
How difficult is the course, how is grading? Thanks!
Hey, on chapter 18.3.2 in Bjarne's book Programming Principles and Practice using C++, 2nd ed, he writes a vector class from scratch, and he's in the process of writing the copy assignment. He writes:
vector& vector::operator=(const vector& a)
// make this vector a copy of a
{
double* p = new double[a.sz]; // allocate new space
std::copy(a.elem,a.elem+a.sz,elem); // copy elements
delete[] elem; // deallocate old space
elem = p; // now we can reset elem
sz = a.sz;
return *this; // return a self-reference (see §17.10)
}
where elem is an array of elements of size sz. This code doesn't work. Shouldn't it be:
vector& vector::operator=(const vector& a)
{
delete[] elem;
elem = new double[a.sz];
std::copy(a.elem,a.elem+a.sz,elem);
sz = a.sz;
return *this;
}
which seems to work. Is there an error in the book?
I have been following the proposal "Zero-overhead deterministic exceptions: Throwing values" by Herb Sutter. Yesterday, I came across a paper by Bjarne named "C++ exceptions and alternatives". I can't help but noticing that Bjarne's paper reads like a overall refutation of some main statements made by Sutter in his proposal. For example (emphasis mine) :
It is often said that the first step to solve a problem is recognizing there is one. It seems that two prominent figures sitting on the C++ standard committee can not agree on some basic facts concerning the exception handling model of C++: whether the current C++ exception model is inherently flawed, or it is just implemented poorly and misunderstood/misused by many C++ programmers.
So, what is your opinion on this matter?
Bei u/arte_de kam am Wochenende der Film "Geliefert" mit Bjarne Mädel.
Mädel spielt einen Paketboten, der neben seinem stressigen Job, seinem Arschloch-Chef und seinem pubiertierenden Sohn auch noch jedes andere Unglück anzieht. Sein Hauptproblem ist aber, dass er einfach zu gut für die Welt ist.
Ich möchte nicht zu viel vorwegnehmen, aber der Film ist einer dieser kleinen nieschigen Filme, die man unerwartet entdeckt und die man eigentlich direkt ein zweites mal sehen möchte. Mädel spielt seine Rolle glaubwürdig wie immer, die ganze Stimmung im Film passt einfach und nach wenigen Minuten habe ich aufgehört mich zu fragen, warum Schotty von der Reinigungs- in die Logistikbranche gewechselt ist.
https://www.arte.tv/de/videos/095695-000-A/geliefert/
There is also someone called codebeauty on yotube she appears to be a super model of some sort who also teaches C++
Which one of these is the best bet?
I have the Bjarne book but the exercises and drills are waaaay too boring and awful to even attempt. But I going through the actual book and redoing what he is teaching in the book.
But I am burned out and exhausted by his drills and exercises I don't want to do it.
I am just trying to learn programming btw I am new and self teaching
"There are only two kinds of languages: the ones people complain about and the ones nobody uses." - Bjarne Stroustrup
Please note that this site uses cookies to personalise content and adverts, to provide social media features, and to analyse web traffic. Click here for more information.