Re: Heap Corruption during run time.
but there's no reason why the java approach can't be applied to C++ just as easily. C++ viewn as just "C with objects", without the STL, without templates and without all the other things that separate it from it's granddaddy C (C++ has since evolved on it's own path not even following C anymore) is a concept that is outdated by many years now. THis might have been a useful approach when nobody knew C++ and C++ was still little more than a preprocessor for C. But it's gone way beyond that now.
It's like teaching someone to drive a car... By first telling them how to tend to a horse and making them drive around in a horse carriage for a whole year.
Even if you did teach the class by first teaching C, and then migrating over to C++, this assignment is bad because it makes not much sense if you look at it from a C p.o.v. and it's silly as a C++ p.o.v. because you're better off using STL.
I'm not saying there is no merit to teaching someone how to write a container, but then you'd do this because you want to do something STL doesn't provide and even then you'd make sure that students know about ths STL approach to things, so that the container they need to design is usable with the rest of the STL algorithms etc. (hardly a beginners class but hey).
Re: Heap Corruption during run time.
Quote:
but there's no reason why the java approach can't be applied to C++ just as easily.
Agreed, but try getting the teachers to do this!:cry:
PS I think the benefit of the java approach is starting to filter through as there is now an 'early object' version of the well known Deitel 'c++ How to program' book that also covers c++11 (although I haven't yet seen a copy so can't comment upon how good it is).
http://www.amazon.co.uk/How-Program-...0008707&sr=1-2
Re: Heap Corruption during run time.
Quote:
Originally Posted by
2kaud
Agreed, but try getting the teachers to do this!:cry:
Then you get those who will say "but C++ programmers who learn the "high-level" way without learning the low-level details first will not be good programmers".
The problem with that statement is that this "C++ programmer who doesn't know low-level details" doesn't exist, or I have yet to meet such a programmer. It's plain foolish to think that a C++ programmer who knows how to use design patterns, STL, boost, MFC, etc. to structure a well-written, modular, easily maintained program can't manipulate a few pointers or know how to use char*, dynamically allocated memory, strcat or strcmp() properly.
Regards,
Paul McKenzie
Re: Heap Corruption during run time.
Quote:
Originally Posted by
Paul McKenzie
Then you get those who will say "but C++ programmers who learn the "high-level" way without learning the low-level details first will not be good programmers".
But if you are using c++ 'correctly' - ie high level - how often do you need the low-level detail? IMO if you are regularly using the 'low level detail' (unless you really are twiddling bits) then you are not using c++ properly.
Re: Heap Corruption during run time.
Quote:
Originally Posted by
2kaud
But if you are using c++ 'correctly' - ie high level - how often do you need the low-level detail? IMO if you are regularly using the 'low level detail' (unless you really are twiddling bits) then you are not using c++ properly.
I know. But you still get those responses from die-hards who believe that teaching low-level details should be done first.
So the way I counter their argument is to show me this (mythical) C++ programmer who, if need be, can't write a module or get involved in some low-level coding. So far, no such programmer can be produced.
Regards,
Paul McKenzie
Re: Heap Corruption during run time.
Re: Heap Corruption during run time.
Frankly guys, how is the OP to benefit from the last posts? I feel that many threads ends up in a a lot of posts that blame the teachers of teaching the wrong stuff and giving the wrong type of excercises but that's not what the board is about is it? Shouldn't every post be focused on trying to help the OP the best we can?
Re: Heap Corruption during run time.
Quote:
Originally Posted by
S_M_A
Frankly guys, how is the OP to benefit from the last posts? I feel that many threads ends up in a a lot of posts that blame the teachers of teaching the wrong stuff
I'm still waiting for the OP to post the other functions instead of descriptions of what he/she did. That is what I asked for, and so far, nothing.
Also, a test program to see how these classes and functions are being used and called wasn't posted so we see what the flow was that ultimately led to the crash.
Regards,
Paul McKenzie
Re: Heap Corruption during run time.
Quote:
Originally Posted by
Paul McKenzie
I'm still waiting for the OP to post the other functions instead of descriptions of what he/she did. That is what I asked for, and so far, nothing.
Also, a test program to see how these classes and functions are being used and called wasn't posted so we see what the flow was that ultimately led to the crash.
Regards,
Paul McKenzie
I agree with S_M_A. Railing against the nature of the assignment doesn't really help the student. We who have been doing it for a while, know how goofy some of these assignments are, but the student is still required to implement them.
Regardless, I pointed out what I think is the likely cause in post #2. It would be kind of nice if the OP would comment on that.
Re: Heap Corruption during run time.
Maybe we should ask for a "What C++ teachers should teach and why" forum (and of course the other langauges as well)? After all, we all do represent the industry and we do know what we want people that just graduated to know.