I'm used to the C++ world where there's a fairly clear distinction between dealing with an object directly and dealing with a pointer or reference... so maybe I'm overthinking things somewhat, but I...
Can anyone give me an example of how to set this up when the StringCollection is a class member? I've been able to get it to work with a StringCollection that's in project settings, but can quite...
Preferably something aimed towards a more experienced programmer (have about 8 years now of C++ experience, and various other languages). I've tinkered with C# from time to time and it isn't that...
What you have there isn't really a singleton... it's something more like a factory. Only one A exists within the createA() function (thanks to it being static), but you have more than one A in your...
"Continue" causes the rest of the loop to be skipped. So when it's triggered, execution just goes back to the start of the loop, meaning you never advance to the next character in the string.
I'd say it's because with just "arr", automatic type conversion has the array decay into a pointer to its first value, with the type int*. The declaration "int (* ptr)[3]" specifically needs a...
Sure it's possible. But why would you want to? The concept of c-style strings revolves around them being null-terminated. The only time I can think of when you might even think about doing it is...
A lot of people in this thread seem to be forgetting the current job climate. Can you be a very good programmer without a degree? Of course. Are you likely to get a programming job at the moment...
In performance? I don't really see how it would. Member ordering can affect the object's size though, depending on compiler settings and so on (probably no difference for a simple case like that...
It looks like the errors stem from missing includes in phonebook.h. The compiler reads and processes each file from top to bottom, so you need to include the appropriate headers for std::string and...
You don't. The vector allocated the memory and the vector is responsible for cleanup. If you need to remove individual items you can do so using pop_back(). Otherwise you don't need to worry about...
*cResult.getTotalSum() will attempt to dereference the value returned by getTotalSum rather than the pointer cResult. Use (*cResult).getTotalSum() or, preferably, cResult->getTotalSum().