السلام عليكم
عندي سؤال وياريت الاقي جوابه
عبارة عن برنامج طوويل في الـ structure
وارجوا اللي يعرف مايبخل علي
وشكرا لكم
>> السؤال في المرفقات على شكل صورة..
السلام عليكم
انا ابي اتعلم قبل الاجابه..
وحطيته بس بالمنتدى هذا
حاولت اكتب البرنامج بس ماقدرت اكمل وهذا اللي كتبته واحس كله غلط بغلط
#include "stdafx.h"
#include<iostream>
#include<fstream>
using namespace std;
void getData(
struct manuItemSpecification{
string ingredients[];
string breifdescription;
};
struct manuItem{
string name;
manuItemSpecification description;
double price;
};
struct selectedItem{
string name;
int quantity;
};
manuItem menuList[];
int size=1000;
void getData(
int main(){
ifstream infile;
infile.open("manu.txt");
if(!infile){
cout<<"can not open the file"<<endl;
return -1;
}
void getData(infile,menuList,size);
return 0;
}
void getData(ifstream inf,menuItem List[],int&size){
while(inf){
string nam;
manuItemSpecification description
string ingred[];
string breif;
double cost;
int i=0;
inf>>nam>>cost>>ingred>>breif;
List.name=nam;
List.price=cost;
List.description.ingredients=ingred;
List.description.breifdescription=breif;
i++;
}
size=i+1;
}
تأسف إدارة الفريق العربي لغلق الموضوع وذلك لمخالفته قوانين المشاركات. فقرة اختيار عنوان مناسب لمحتوى الموضوع.
و السؤال مخل للفهم و الادراك.
مكان السؤال ليس في هذا القسم من المنتدي
قواعد طرح المشاركات
تم تعديل هذه المشاركة بواسطة الشهاب الحارق في 20 يوليو 2007 في 23:23
في المثال يتضح المقال
هذا الموضوع مغلق.