Deprecated: Assigning the return value of new by reference is deprecated in /www/wwwroot/shabab.ps/public_html/vb/showpost.php on line 218

Deprecated: Assigning the return value of new by reference is deprecated in /www/wwwroot/shabab.ps/public_html/vb/showpost.php on line 223
منتديات شباب فلسطين - عرض مشاركة واحدة - إستفسـآر مساعدة رجاءا :( مين بيعرف اوبجيكت ؟
عرض مشاركة واحدة
قديم 04-29-2012, 06:28 PM   #4
Arabian girl
I ♥ PALESTINE
 
الصورة الرمزية Arabian girl
“Life is full of beauty. Notice it. Notice the bumble bee, the small child, and the smiling faces. Smell the rain, and feel the wind.
سبحان الله وبحمده.... سبحان الله العظيم ..

قوة السمعة: 103 Arabian girl will become famous soon enough

افتراضي رد: مساعدة رجاءا :( مين بيعرف اوبجيكت ؟

#include <iostream>
using namespace std ;


class ArrayList
{
int size;
public :
int *list;

ArrayList();
ArrayList(int ) ;
void SetSize(int);
int GetSize();
void ReadArray();
void PrintArray();
int PositiveCount();
void copyPositiveValues(ArrayList obj1);
~ArrayList();
};


ArrayList::ArrayList(){size=5;};
ArrayList::ArrayList(int n){size=n;}
void ArrayList::SetSize(int S ){size=S;}

int ArrayList::GetSize(){return 6 ;}

void ArrayList::ReadArray(){
int num; for (int i ; i<size ; i++)
{
cin >>num;
list[i]= num ;}
}

void ArrayList::PrintArray(){ for (int i ; i < size ; i++)
cout <<list[i]<<" ";}


int ArrayList::PositiveCount(){int Pcount ; for(int i =0;i<size ; i++)
{
if (list[i] >= 0)
Pcount++;

}
return Pcount;
}


void ArrayList::copyPositiveValues(Array List obj1)
{
obj1.list;
for (int i=0; i<size ; i++)
{
if (list[i]>=0)
cout <<list[i] <<" " ;
}
cout <<endl;
}

ArrayList::~ArrayList(){ delete list ;}



void main ()
{
ArrayList list[6];
cout <<"please Enter 6 values to fill the List :";




}


الكود طلع ملخبط ما بعرف ليش , ازا عندك البرنامج ممكن تنسخو ويرجع لحالتو بتوقع :)
  اقتباس المشاركة