« first day (1492 days earlier)      last day (1361 days later) » 

9:50 AM
EytzingerVector.h:36:19: error: ISO C++ forbids declaration of ‘EytzingerVector’ with no type [-fpermissive]
EytzingerVector() { };
I am not understanding the source of this error
template<typename T, typename I, bool aligned=false>
class EytZingerVector
{
 
@gansub you're leaving out some context, that code compiles: gcc.godbolt.org/z/s31GcY
 
@PeterT Thanks. What is the maximum amount of code that I can show here ?
10 lines ?
 
just paste it to some site like gist.github.com
and send the link
 
10:07 AM
you have typing error
EytZingerVector
EytzingerVector
you the z sometimes captitalized and sometimes not
 
ok sorry !
 
 
4 hours later…
2:15 PM
In C++if i have a A[26][26] matrix.Can I get the address of [10][40]?
 
nwp
It's technically undefined behavior. Also the address would be useless since the element doesn't exist.
In practice it's probably the same as [11][14] and works just fine.
 
2:58 PM
Quoted from a book:


Every entity has a type. What is a type? A type is a set of possible values and operations.
Instances of types are called objects. An object is some region in memory that has a
value of particular type (not to be confused with an instance of a class which is also
called object).
What I don't understand is "why did the author warn us not to confuse with an instance of a class which is also called object?" For me, an instance of type (a class as well as a struct) is an object.
Please ping me if you respond my question above. Thank you in advance!
 
int* a;
@ArtificialStupidity in that case "a" is certainly an object in the C++ sense, but not in the Object Oriented programming sense
 
@PeterT: How about int a, is a an object as well in C++ sense but not in OOP sense?
 
nwp
It depends on who you ask. Java for example says it's not an object but a primitive type. C++ on the other hand tries to minimize the difference between builtins and user-defined classes.
And even in C++ int lacks some properties. You cannot inherit from it, you can't reuse its operators, you cannot take the address of int operator+(int, int), ....
 
@nwp: Thank you very much. OK. I should not take this difference too seriously.
@PeterT: Thank you.
 

« first day (1492 days earlier)      last day (1361 days later) »