• 0
  • مالي خلق
  • أتهاوش
  • متضايق
  • مريض
  • مستانس
  • مستغرب
  • مشتط
  • أسولف
  • مغرم
  • معصب
  • منحرج
  • آكل
  • ابكي
  • ارقص
  • اصلي
  • استهبل
  • اضحك
  • اضحك  2
  • تعجبني
  • بضبطلك
  • رايق
  • زعلان
  • عبقري
  • نايم
  • طبيعي
  • كشخة
  • النتائج 1 إلى 4 من 4

    الموضوع: مساعدة في الـ Prototype ..!

    1. #1
      التسجيل
      23-08-2003
      الدولة
      i'm doing business
      المشاركات
      4,606
      المواضيع
      266
      شكر / اعجاب مشاركة
      بطاقات الألعاب

      Gamertag: rubso

      مساعدة في الـ Prototype ..!

      السلام عليكم اخوتي الكرام ، محتاج مساعدتك في حل المشكلة في هذا البرنامج ..
      بإستخدام فانكشن البروتوتايب

      كود:
      #include <iostream>
      
      using namespace std;
      
      int maximum ( int x, int y, int z );
      int main()
      {
          char dummy;
          int mx; /*Variable need to save function here*/
          int x1 = 77;
          int y1 = 93;
          int z1 = 88;
          mx = maximum ( x1, y1, z1); /*function call by reference*/
          cout<<"The Max Number="<< mx << endl;
          cin >> dummy;
          return 0;
      }
      الكومبايلر Dev-Cpp/gcc
      هذا الخطأ
      كود:
      Compiler: Default compiler
      Building Makefile: "C:\Documents and Settings\rubso\My Documents\C++ Course\function prototype\Makefile.win"
      Executing  make...
      make.exe -f "C:\Documents and Settings\rubso\My Documents\C++ Course\function prototype\Makefile.win" all
      g++.exe -c main.cpp -o main.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"C:/Dev-Cpp/include/c++/3.4.2/backward"  -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"C:/Dev-Cpp/include/c++/3.4.2"  -I"C:/Dev-Cpp/include"   
      
      g++.exe main.o  -o "function-prototype.exe" -L"C:/Dev-Cpp/lib"  
      
      main.o(.text+0x154):main.cpp: undefined reference to `maximum(int, int, int)'
      collect2: ld returned 1 exit status
      
      make.exe: *** [function-prototype.exe] Error 1
      
      Execution terminated





    2. #2
      التسجيل
      23-08-2003
      الدولة
      i'm doing business
      المشاركات
      4,606
      المواضيع
      266
      شكر / اعجاب مشاركة
      بطاقات الألعاب

      Gamertag: rubso

      رد: مساعدة في الـ Prototype ..!

      اقتباس المشاركة الأصلية كتبت بواسطة rubso
      السلام عليكم اخوتي الكرام ، محتاج مساعدتك في حل المشكلة في هذا البرنامج ..
      بإستخدام فانكشن البروتوتايب

      كود:
      #include <iostream>
      
      using namespace std;
      
      int maximum ( int x, int y, int z );
      int main()
      {
          char dummy;
          int mx; /*Variable need to save function here*/
          int x1 = 77;
          int y1 = 93;
          int z1 = 88;
          mx = maximum ( x1, y1, z1); /*function call by reference*/
          cout<<&quot;The Max Number=&quot;<< mx << endl;
          cin >> dummy;
          return 0;
      }
      الكومبايلر Dev-Cpp/gcc
      هذا الخطأ
      كود:
      Compiler: Default compiler
      Building Makefile: &quot;C:\Documents and Settings\rubso\My Documents\C++ Course\function prototype\Makefile.win&quot;
      Executing  make...
      make.exe -f &quot;C:\Documents and Settings\rubso\My Documents\C++ Course\function prototype\Makefile.win&quot; all
      g++.exe -c main.cpp -o main.o -I&quot;C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include&quot;  -I&quot;C:/Dev-Cpp/include/c++/3.4.2/backward&quot;  -I&quot;C:/Dev-Cpp/include/c++/3.4.2/mingw32&quot;  -I&quot;C:/Dev-Cpp/include/c++/3.4.2&quot;  -I&quot;C:/Dev-Cpp/include&quot;   
      
      g++.exe main.o  -o &quot;function-prototype.exe&quot; -L&quot;C:/Dev-Cpp/lib&quot;  
      
      main.o(.text+0x154):main.cpp: undefined reference to `maximum(int, int, int)'
      collect2: ld returned 1 exit status
      
      make.exe: *** [function-prototype.exe] Error 1
      
      Execution terminated
      للرفع ! ( 10 احرف )





    3. #3
      التسجيل
      29-01-2004
      الدولة
      الحمدلله -- الكويت -- ^_^
      المشاركات
      2,987
      المواضيع
      83
      شكر / اعجاب مشاركة

      رد: مساعدة في الـ Prototype ..!

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

      أهلا اخوي "ربسو"

      يبدو الكود صحيحا .. لكن ما ينقصه هو "محتوى" لدالة Maximum ..
      يعني اذا ضفت التالي ..
      سيكتمل و يعمل البرنامج ان شاء الله
      كود PHP:
      int maximumint xint yint z ){
      if ( 
      x>=&& x>=)
      return 
      x;
      if ( 
      y>=&& y>=)
      return 
      y;
      if ( 
      z>=&& z>=)
      return 
      z;
      else
      return -
      1;

      لكن .. احتمال يكون عندك خطأ في اعدادات الكومبايلر ..

      على العموم جرب و بانتظار الرد.

    4. #4
      التسجيل
      23-08-2003
      الدولة
      i'm doing business
      المشاركات
      4,606
      المواضيع
      266
      شكر / اعجاب مشاركة
      بطاقات الألعاب

      Gamertag: rubso

      رد: مساعدة في الـ Prototype ..!

      اشتغل اخوي wellknown شكراً على المساعدة





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

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