You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need to be a little bit more careful with the terminology used. I.e. we should remove dynamic array from introduction. We are really introducing the relationship between static arrays and pointers, the notion of a pointer (and the corresponding operations that can be applied to a pointer type), as well as the notion of Heap/free-store memory. We should really emphasize that as users of C++ whom are not writing software for other programmers, we shouldn't ever use naked news or deletes in our program, relying instead on the STL (wherein our dynamically sized (and separately, also heap-allocated) vectors come into play).
The text was updated successfully, but these errors were encountered:
Also, when we talk about dynamic arrays we also introduce how to pass an array pointer and an integer specifying the array size as argument to a function. We should move this to an earlier section so that students don't get confused that this is something unique to dynamic arrays...it works just as well for static arrays.
We need to be a little bit more careful with the terminology used. I.e. we should remove
dynamic array
from introduction. We are really introducing the relationship between static arrays and pointers, the notion of a pointer (and the corresponding operations that can be applied to a pointer type), as well as the notion of Heap/free-store memory. We should really emphasize that as users of C++ whom are not writing software for other programmers, we shouldn't ever use nakednew
s ordelete
s in our program, relying instead on the STL (wherein our dynamically sized (and separately, also heap-allocated)vector
s come into play).The text was updated successfully, but these errors were encountered: