النتائج 1 إلى 2 من 2

الموضوع: HeLp

  1. #1
    التسجيل
    27-06-2004
    الدولة
    UAE
    المشاركات
    1

    HeLp

    لسلام عليكم ....انا مشتركه جديده في المنتدى بس من المتابعين للمواضيع الخاصه بالC++ وعندي برنامج احترت في الحل واذا ممكن المساعده فيه

    creat a class DoubleScripetdArray that has a this feature :constructur,copy constructur,dectructur,set fuction . at construvtion time ,the class should be abole to creat an arry of any number of row and columns.the class also supplt operator() to perform double_Scripetd operation ,ex: in 3 by 5 DoubleScripetdArray called a the user could wriye a(1.3) to acvsess the ellement in row 1 and column 3 :note that this operatore can recive any numer of arguments.function operatore should perform the proper pointer arithmatic to accsess each element of the array,the class should also provide the following operatore (==,!= ,=,<<, >>)

    اتمنى تكونوا فهمتوا الكلاس وبالنسه لين الحل اللي فكرت فيه كان على single array لا ني تخربطت في الدبل ..وهذا مثال للحل:

    class Array }
    friend ostream &operator<<(ostream$,const Array &); p
    friend istream &operator<<(istream$,i Array &); p

    public:
    Array (int )
    Array (const Array &)
    ~Array();
    int GetSize ();
    const operator ==(const Array &); p
    bool operatore !=(const Array right)const ;
    {
    return !(this==right);
    }

    private:
    int size;
    int *ptr;
    }

    هذا اللي فكرت فيه وبالنسبه لل implementation تخرربطت في حله وطلع لي errors
    ارجوا تساعدوني في حل هالكلاس على DoubleScripetdArray

  2. #2
    التسجيل
    16-05-2004
    الدولة
    Cairo, Egypt
    المشاركات
    141

    Cool Re: HeLp

    ممم, ماشى ..هى صعبه شويه(طويله جدآ) لكن ممكن تتعمل..are u sure that u can intialize the class with any number of arguments??it's doable, but it won't be dobule any more, it may be of any dimention, treple or quadratic, anyways
    also why a set function when u r overloading the = operatoer and have a constructor and a copy constructor??and r we going to return pointers or real numbers
    please give me feed about those points and i'll start working in it
    و الجهل زاد فى البتاع, لا مقرى ولا منقول...

ضوابط المشاركة

  • لا تستطيع إضافة مواضيع جديدة
  • لا تستطيع الرد على المواضيع
  • لا تستطيع إرفاق ملفات
  • لا تستطيع تعديل مشاركاتك
  •