prob

This is a discussion on prob within the C Programming forums, part of the General Programming Boards category; Code: #include<iostream.h> #include<conio.h> class test { private: float a,b,c; int q,w; public: int test(int q, int w=4) { return(q*w); } ...

  1. #1
    Registered User
    Join Date
    Nov 2012
    Posts
    22

    prob

    Code:
    #include<iostream.h>
    #include<conio.h>
    
    
    class test
    {
    private:
    float a,b,c;
    int q,w;
    public:
    int test(int q, int w=4)
    {
    return(q*w);
    }
    float test(int a,int b,int c)
    {
    return ((a+b+c)/3);
    }
    };
    void main()
    {
    clrscr();
    test o,p,l;
    
    
    o=test(2,3);
    p=test(2);
    l=test(1,2,4);
    getch();
    }
    compiling error
    cant convert int to * test
    and also ::test






  2. #2
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,471
    Duplicate
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Prob
    By Ajsan in forum C++ Programming
    Replies: 4
    Last Post: 05-09-2004, 11:24 AM
  2. map[y][x+1] prob
    By Maurad3r in forum C++ Programming
    Replies: 1
    Last Post: 04-14-2004, 03:01 AM
  3. IDE prob
    By MicroFiend in forum C++ Programming
    Replies: 1
    Last Post: 03-04-2004, 03:28 PM
  4. IE6.0 Prob
    By valar_king in forum A Brief History of Cprogramming.com
    Replies: 9
    Last Post: 12-02-2002, 08:43 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21