CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: Paul McKenzie

Search: Search took 3.25 seconds.

  1. Replies
    27
    Views
    22,943

    Re: Class design

    If it even was possible, does it make it "right"?

    For example, what if I defined a class where operator + does subtraction, and operator - did addition? Could I do it? Yes. Would it be...
  2. Replies
    27
    Views
    22,943

    Re: Class design

    There is no way, and it is a good thing that it doesn't work.

    If it did work, then your code would run counter to how C++ is supposed to behave. If any C++ programmer were to see this:

    ...
  3. Replies
    27
    Views
    22,943

    Re: Class design

    The issue is that you do not have a full grasp of pointers and how to properly handle dynamically allocated memory. Without this, you cannot create a string class.

    Secondly, there shouldn't be...
  4. Replies
    27
    Views
    22,943

    Re: Class design

    The obvious question is why you just don't use std::string? All of this work is taken care of already for you.

    If you had this trouble in figuring out how to properly handle dynamically allocated...
Results 1 to 4 of 4





Click Here to Expand Forum to Full Width

Featured