09:19:36 From Andres Vargas : is p a copy of a pointer to the begining of a? 09:20:38 From Andres Vargas : I mean, p is still a copy, is that way p = 0 doesn't have any effect? 09:20:59 From Andres Vargas : why* 09:21:50 From Kurt Biery : Yes, it is a copy, so within the context of the function, the pointer gets set to zero, but in the main program, nothing changes 09:22:15 From Andres Vargas : Thank you 09:37:56 From Becky Kowalski : What is meant exactly by "constant time" and "linear time"? 09:38:03 From Andres Vargas : The default initialization of "int a[n]" does depend on the compiler? I'm runing it within root and it takes longer the bigger the n 09:38:12 From Marc Paterno : Constant time means the time taken does not increase as the array gets longer. 09:38:37 From Marc Paterno : Linear time means the time taken increases linearly (as opposed to say quadratically) with the size of the array. 09:38:52 From Becky Kowalski : Ah, thank you 09:39:25 From Marc Paterno : For “constant time” one will often see the notation O(1), and for linear one often sees O(n). 09:57:47 From Marc Paterno : A fairly thorough description of different kinds of iterators (called iterator categories) is available at https://en.cppreference.com/w/cpp/iterator. Note that a pointer into an array *is* a random-access iterator, as is a vector iterator. 10:00:58 From Andres Vargas : Thank you, I'm curious about the way to declare it vector::iterator is like vector like a template for the iterator? 10:02:13 From Marc Paterno : vector is a class template, as opposed to a class. vector is a class; you can make objects of type vector, but not of vector. 10:02:56 From Andres Vargas : so vector::iterator is a class explicitely defined, or defined through a template? 10:03:00 From Marc Paterno : vector::iterator is a class. It happens to be defined inside the class vector, which is why you need to use the “qualified name” to access the name of the type. 10:03:33 From Andres Vargas : Oh I see, so vector is the namespace? 10:03:49 From Marc Paterno : The class template vector defines the nested type vector::iterator, so for every type T, there is a type vector::iterator. 10:04:24 From Marc Paterno : And yes, in this way vector is a namespace. All C++ classes (and structs) are also in this namespaces. 10:04:48 From Andres Vargas : Oh Thank you, now makes sense the use of :: 10:04:51 From Andres Vargas : :) 10:35:22 From Andres Vargas : is std::array still on stack? 10:37:36 From Marc Paterno : The sequence of objects contained by std::array are on the stack. The std::array object itself is also on the stack. Both assuming that the std::array is not created using “new array”, which would be legal but probably silly. In that case, std::vector is likely a better choice.
Darn, that was supposed to be public. 10:41:51 From Andres Vargas : thank you again 10:42:09 From Marc Paterno : You’re welcome, Andres. 10:45:02 From Jaiden Parlone : Does anyone know where the notes Glenn writes are stored please? 10:45:27 From Andres Vargas : https://gitlab.com/gpdowning/oopl-fnal/ 10:45:43 From Andres Vargas : Is line 228 typename instead of template? 10:46:05 From Jaiden Parlone : Great, thank you Andres 10:46:57 From Marc Paterno : Andres, can you point to which file you’re talking about? 10:47:30 From Andres Vargas : the shown in screen Marc :) 10:47:37 From Andres Vargas : is 230 now 10:47:48 From Jaiden Parlone : I think in the current one, it reads: template