Results 1 to 7 of 7

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    =D BOdyROck's Avatar
    Join Date: Sep:2008
    Location: In My Mind
    Posts: 133

    [Linker error] c++



    Code:
    #include <iostream>
    #include <cstdlib>
    #include <cmath>
    
    using namespace std;
    
    const double pi = 3.14;
    
    class Rectangle 
    {
        private: 
            double a, b;
            
        public:
            double n;
            void calcAB ();
            void print () 
            {
                calcAB();
                cout << endl << "Rectagle ABCD With Sides: " << endl;
                cout << "a=" << a << endl;
                cout << "b=" << b << endl;
            }    
    };
    
    
    
    int main () 
    {
        
        Rectangle r;
        r.n = 10;
        r.print ();
        
        system ("pause");
        return 0;
    }
    Linker error ... :S
    Epox 8U1697 GLI, Sempron 2800+ OC@2640Mhz, 512+1GB ddr400@165mhz 2.5-3-3-7 1T, Asus 8600GT, 160GB HITACHI, 320GB Samsung, 1TB WDC

  2. #2
    philosophus duratea icaci's Avatar
    Join Date: Oct:2006
    Location: Aachen
    Posts: 2,698
    Rectangle::calcAB()? , , .
    Internet - it doesn't make you stupid, it just makes your stupidity more accessible to others

  3. #3
    =D BOdyROck's Avatar
    Join Date: Sep:2008
    Location: In My Mind
    Posts: 133
    ?
    Epox 8U1697 GLI, Sempron 2800+ OC@2640Mhz, 512+1GB ddr400@165mhz 2.5-3-3-7 1T, Asus 8600GT, 160GB HITACHI, 320GB Samsung, 1TB WDC

  4. #4
    Registered User
    Join Date: Dec:2007
    Location: Sofia
    Posts: 366

    - , Rectangle::calcAB(). .

  5. #5
    =D BOdyROck's Avatar
    Join Date: Sep:2008
    Location: In My Mind
    Posts: 133
    Code:
    {
        private: 
            double a, b;
            
        public:
            double n;
            
            void calcAB ();
            void print (); 
    };        
    
    void Rectangle::calcAB ()
    
    void Rectangle::print ()       
            {
                calcAB();
                cout << endl << "Rectagle ABCD With Sides: " << endl;
                cout << "a=" << a << endl;
                cout << "b=" << b << endl;
            }
    \

    . .
    Epox 8U1697 GLI, Sempron 2800+ OC@2640Mhz, 512+1GB ddr400@165mhz 2.5-3-3-7 1T, Asus 8600GT, 160GB HITACHI, 320GB Samsung, 1TB WDC

  6. #6
    Registered User
    Join Date: Dec:2007
    Location: Sofia
    Posts: 366
    , void Rectangle::calcAB ()?

    Code:
    void Rectangle::calcAB ()
    {
       //     
    }
    , .

  7. #7
    =D BOdyROck's Avatar
    Join Date: Sep:2008
    Location: In My Mind
    Posts: 133
    Epox 8U1697 GLI, Sempron 2800+ OC@2640Mhz, 512+1GB ddr400@165mhz 2.5-3-3-7 1T, Asus 8600GT, 160GB HITACHI, 320GB Samsung, 1TB WDC

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |