الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

استفسار عن دالة + شرح لمكتبة الروند روبن

بدأه raja2 في 15 أبريل 2008 · 7 رد · 714 مشاهدة · في الأسئلة المجابة
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

السلام عليكم

قمت بتنفيذ برنامج round robin

يوجد خطأين بهذه الدالــة

والدالة ليست خاطئة كما اعلم

clrscr();

كذلك مكتبة الروند روبن

#include "roundrobin.h"

ما هو الخطأ فيها ؟؟

ارجو الرد سريعا حتى يتم تنفيذ البرنامج

تحياتي

#2

ماهو الكمبايلر المستخدم !.

tvquran_6.gif

#3

ما بعرف والله

انا بشتغل على ؤ بلس بلس 6

؟؟

#4

هذه الدالة غير موجودة على الكمبالير

microsoft c++6

tvquran_6.gif

#5

طيب اخي ما هو الحل ؟؟

و كيف ممكن ان استبدلها ؟

#6

البديل

system("cls");
tvquran_6.gif

#7

هاد برنامج تاني انا عملته

ماف ياخطاء

ارجوك طبقه حتى تعرف لماذا يعلق البرنامج عند رقم 3

وتحاول تعدله

#include <iostream>
using namespace std;

class nod 
{public:


int data;
nod *next;
nod *prev;


nod(int x)
{
  next= NULL;
  prev= NULL;
  data=x;

}
};


class queu{
public:
nod *h;
int x;
queu()

{h=NULL;}


bool empty()
{
  if (h->next == h->prev)
   return 1;
  else 
   return 0;
}


void enqueu (int num)
{

  nod *temp;
  temp = new nod(x);
   temp ->data = num;
   if (h == NULL){
   h =temp;
  h ->next =h;
  h->prev =h;}
   else{
   h->prev->next=h;
  temp->prev=h->prev;
  h->prev=temp;
  temp->next=h;}
}

int Dequeue()
{ int temp;
temp= h->data;
	 if( h== h->prev )
	 {
			 delete h;
			 h=NULL;}

	   else {
		 nod *h2;
			h2=h->next;
			h->next->prev=h->prev;
			h->prev->next=h->next;
			h->next=NULL;
			h->prev=NULL;
			delete h;
			h=h2;

	}return temp;
}

void print() 
{
  nod *p=h;
  while (p!=NULL)
  {
   cout<<p->data;
   p=p->next;}
}
};







void main()
{
int x;

queu obj;
int choice,time_slice ,cpu_time;

cin>>x;

cout<<"1.enter 1 to insert cpu time\n 2.enter 2 to insert the time slice . \n 3- enter 3 to perform RR algorethem ";

cin>>choice;


while (choice>0){

	  switch (choice)

{

		  case 1:
		   cin>>cpu_time;break;

		  case 2:
		  cin>>time_slice;break;

		  case 3:
			 while(!obj.empty())
	{
			x= obj.Dequeue();
			x=x - time_slice;
			if(x>0)
			obj.enqueu(x);
   obj.print();
	}
   break;

	default :
	 cout<<"try again";

   }

   cin>>choice;
	}
}
#8

الله يسامحكم تابعوا الموضوع

............

؟؟؟

مواضيع مشابهة

عدد الزوار حالياً

المتواجدون خلال آخر دقيقتين · يتحدّث كل ٣٠ ثانية

—الإجمالي—أعضاء مسجّلون—زوار بدون تسجيل

جارٍ التحقق من المتواجدين…