My 2c:
Understanding pointers, classes, objects and arrays are the very basic things. If you fail to show that you 100% understand those, you will fail the interview
Hardly any company will want to...
Your algorithm returns true for angle1 = 170 and angle2 = -170 (distance 20°) but false for angle1 = 10 and angle2 = -10 (also distance 20°). So I would say, your algorithm is flawed.
I was trying the same approach, i.e. using a generic class to wrap around the function(s) but always ended up with the same problem, i.e. how to pass the function as a template...
I have in the past written code for templated functions where one function argument can be either a function pointer or a Functor. Works pretty straightforward.
To make one thing clear: Your programm cannot know, where the "Tuesday" section starts without reading the file from beginning until it finds Tuesday. So to read only the Tuesday section, you have...
Hmm, that's what I assumed and tried but it gave me "the pure virtual method called" error, so I thought I was truncating the derived classes to their...
I'm trying to implement a class hierarchy and a wrapper class with a pointer to the base class. The base class has operator< overloaded and the implementation makes use of virtual functions as some...
Overloading indeed solves my problem, but iirc, combining overloading and template specialization causes some difficult to predict behaviour (depending on the...
If your images are jpegs (or in a similar format), scaling might not be the only problem but also the lossy compression algorithm being used will likely have an even higher impact. Try opening a png...
I'm trying to get template specializations working for char * as well as for char[]. I.e. in the following code the last test does not use the specialization and fails:
All advanced cryptology works on large (incredibly large) numbers. So the text you encrypt is interpreted as a bunch of bytes forming a large number and likewise the encrypted message is a large...
If the object contains a body, an octant and 8 objects, each of them containing a body, an octant and 8 objects, each of them containing a body, an octant and 8 objects, each of them ..... I don't...
AFAIK, std::map does not declare a virtual destructor (in the implementation I have at hand, it does not declare a destructor at all). So publicly deriving a class (in this case mysql_map) from it is...