Tagged Questions
4
votes
4answers
2k views
Was C designed to facilitate Object-Oriented programming?
I am trying to broaden my understanding of the history and development of object-oriented programming, and I am curious to find out
if C was designed to facilitate Object-Oriented programming? (like ...
2
votes
3answers
2k views
Functions returning pointers
C++ noob here. I have a very basic question about a construct I found in the C++ book I am reading.
// class declaration
class CStr {
char sData[256];
public:
char* get(void);
};
// ...
4
votes
2answers
821 views
Smart Pointers inside class vs Normal Pointers with Destructor
Regarding pointers which are members of classes. Should they be of a smart pointer type or is it enough to simply deal with them in the destructor of the class they are contained in?