No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Ok, I'm really getting helpful answers from this site!!! Here's my new C++ question: How much code can go in an initializer list? Can I call new SomeClass() to get a pointer to initialize something even if it wasn't in the original argment list? Can I do math on the … |
|
Dear all, I'm starting to get the hang of this C++ business, but I have one question that I just realized I don't have an answer to. Suppose I want to call a constructor from within a constructor to reduce redundancy in the parts that are identical. I seem to … |
|
Hi all, I'm gradually starting to make this transition from the world of C to C++, and now that I have a little progress, I have some things that are still a bit confusing to me. One of them is if I nest a class inside another class. If I'm … |
|
I'm sort of duplicating this post because it requested that I start a new thread because I was replying to an old one, but here is a statement that prompted my questions: "Accessors should be const methods at the very least, because the object state isn't changed in the body." … |
|
Re:
i'm trying to use string stream to get data from an input file. the program works until it get's to adding the elements to the array. i'm still not completely sure how to make use of stringstream yet or if i'm using it right. [CODE] ifstream ipf; ipf.open(test.txt); char c; … |
|
Re:
I posted a while back about how to overload << It seems all the examples online have the second argument as const, ie [code] ostream & operator << (ostream &output, const Point &p); [/code] but if I have a member function that simply returns a double [code] double Point::getX() { … |