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

Search:

Type: Posts; User: 2kaud

Search: Search took 0.09 seconds.

  1. Replies
    9
    Views
    10,927

    Re: Help with Cartesian class

    With this class as it currently is, you don't need to provide either an assignment or a copy constructor as the default ones provided by the compiler are sufficient because no dynamic storage is...
  2. Replies
    9
    Views
    10,927

    Re: Help with Cartesian class

    The declaration for an addition function for the class would be


    Cartesian operator+(const Cartesian& rh);


    This would allow two classes of type Cartesian to be added. ie


    coord3 =...
  3. Replies
    9
    Views
    10,927

    Re: Help with Cartesian class

    You are trying to make things more complicated than they are.



    #include <iostream>
    using namespace std;

    class Cartesian
    {
    private:
  4. Replies
    9
    Views
    10,927

    Re: Help with Cartesian class

    double c;
    double d;
    x=c;
    y=d;


    Just remove these lines as c and d aren't used. You can't do an assignment when the compiler expects a definition/declaration.
Results 1 to 4 of 4





Click Here to Expand Forum to Full Width

Featured