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

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

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

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

Deprecated: Assigning the return value of new by reference is deprecated in /www/wwwroot/shabab.ps/public_html/vb/showthread.php on line 1523
Help Me Plz in My C++ Assignment - الصفحة 2 - منتديات شباب فلسطين
نحن مع غزة


الإهداءات

العودة   منتديات شباب فلسطين > محطات تقنية > مُتعلقات التقنية

إضافة رد
 
أدوات الموضوع انواع عرض الموضوع
قديم 06-12-2007, 03:37 PM   #11
محمود
..{ مديــــــر عــــام }..
 
الصورة الرمزية محمود
عيد فطر سعيد ,,

قوة السمعة: 50 محمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond repute

افتراضي رد: Help Me Plz in My C++ Assignment

السلام عليكم

اختي هنا شرح لمشروع مشابه جدا ً لمشروعك

تفضلي هون وراح تستفيدي

http://www.velocityreviews.com/forum...file-in-c.html

  اقتباس المشاركة
قديم 06-12-2007, 04:13 PM   #12
Palestinian Rose
I ♥ SHABAB
 
الصورة الرمزية Palestinian Rose

قوة السمعة: 6 Palestinian Rose will become famous soon enough

افتراضي رد: Help Me Plz in My C++ Assignment

شكرًا يا أخ محمود

أنا تقريبًا سويت البرنامج ، مع أكيد كتير من المساعدات من النت و الأصدقاء
بس هو بس ناقصو شوية أشياء و بيكمل لحتى أسلمه
  اقتباس المشاركة
قديم 06-12-2007, 04:33 PM   #13
محمود
..{ مديــــــر عــــام }..
 
الصورة الرمزية محمود
عيد فطر سعيد ,,

قوة السمعة: 50 محمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond repute

افتراضي رد: Help Me Plz in My C++ Assignment

اوك شو الي ناقص عندك هلا ؟

وشو الي مش فاهماه فيه ^_^
  اقتباس المشاركة
قديم 06-13-2007, 03:31 AM   #14
محمود
..{ مديــــــر عــــام }..
 
الصورة الرمزية محمود
عيد فطر سعيد ,,

قوة السمعة: 50 محمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond repute

افتراضي رد: Help Me Plz in My C++ Assignment

اسف اختي بس كانت الكهرب قاطعه

شوفي هيك

#include<iostream> //for cin,cout
#include<fstream> //for file processing functions
#include<cctype> //for isalpha(), isdidgit(),....etc. functions
using namespace std;

void outputNumberOfLines(const char *inputFileName , const char *outputFileName);
void outputNumberOfWords(const char *inputFileName , const char *outputFileName);
void outputNumberOfLetters(const char *inputFileName , const char *outputFileName);
void outputNumberOfDigits(const char *inputFileName , const char *outputFileName);
void outputNumberOfPrintableCharacters(c onst char *inputFileName , const char *outputFileName);
int getMenuChoice();

char infile[256]; // Input File
char outfile[256];// Output File


int main()
{




//Optain desired option from user
switch(getMenuChoice())
{
case 1:
outputNumberOfLines(infile,outfile) ;
break;
case 2:
outputNumberOfWords(infile,outfile) ;
break;
case 3:
outputNumberOfLetters(infile,outfil e);
break;
case 4:
outputNumberOfDigits(infile,outfile );
break;
case 5:
outputNumberOfPrintableCharacters(i nfile,outfile);
break;
case 6:
/*


exit(1);

*/

break;
}
cout<<"Result was printed out to "<<outfile<<endl;



return 0;


}

int getMenuChoice()
{
//Choice to be entered by user
int ch;
cout<<"\t\tFile Processing"<<endl
<<"\t\t==============="<<endl
<<endl
<<"1- Number of Lines"<<endl
<<"2- Number of Words"<<endl
<<"3- Number of Lettters"<<endl
<<"4- Number of Digits"<<endl
<<"5- Number of Printable ASCII Characters"<<endl
<<"6- Quit"<<endl;

cout<<">";
cin>>ch;

cout<<endl;

cout<<"You Chose Menu Option #"<<ch<<endl;
cout<<"Enter your input file name: ";cin>>infile;
cout<<"Enter your output file name: ";cin>>outfile;


//Check if user entered invalid choice number
if(ch<1 || ch>6)
{
cout<<"No such option. Please enter a number from the list!"<<endl;
return getMenuChoice();
}
else
return ch;



}
void outputNumberOfLines(const char *inputFileName , const char *outputFileName)
{
//opening file for input
ifstream inputFile (inputFileName , ios :: in );

//opening file for output
ofstream outputFile (outputFileName , ios ::out );

//checking file opening was successful
if (! inputFile )
{
cerr<<"Error opening file:\t"<<inputFileName<<endl ;
exit (1);
}
if (! outputFile )
{
cerr<<"Error opening file:\t"<<outputFileName<<endl ;
exit (1);
}

// a counter variable for no. of lines
int count=0;

//Loop until end-of-file
while(!inputFile.eof())
{
char line[1024]; // a line with max length 1024

//This extracts one line a time
inputFile.getline(line,1024);

count++;
}

//print count result to output file
outputFile<<"Filename: "<<outputFileName<<"\tNumber Of Lines="<<count<<endl;

//closing files
inputFile . close ();
outputFile . close ();
}
void outputNumberOfWords(const char *inputFileName , const char *outputFileName)
{
//opening file for input
ifstream inputFile (inputFileName , ios :: in );

//opening file for output
ofstream outputFile (outputFileName , ios :: out );

//checking file opening was successful
if (! inputFile )
{
cerr<<"Error opening file:\t"<<inputFileName<<endl ;
exit (1);
}
if (! outputFile )
{
cerr<<"Error opening file:\t"<<outputFileName<<endl ;
exit (1);
}

// a counter variable for no. of lines
int count=0;

//Loop until end-of-file
while(!inputFile.eof())
{
char line[1024]; // a line with max 1024

//This extracts one word a time
inputFile>>line;

//don't count single letters
if(strlen(line)>1)
count++;
}

//print count result to output file
outputFile<<"Filename: "<<outputFileName<<"\tNumber Of Words="<<count<<endl;

//closing files
inputFile . close ();
outputFile . close ();
}
void outputNumberOfLetters(const char *inputFileName , const char *outputFileName)
{
//opening file for input
ifstream inputFile (inputFileName , ios :: in );

//opening file for output
ofstream outputFile (outputFileName , ios :: out );

//checking file opening was successful
if (! inputFile )
{
cerr<<"Error opening file:\t"<<inputFileName<<endl ;
exit (1);
}
if (! outputFile )
{
cerr<<"Error opening file:\t"<<outputFileName<<endl ;
exit (1);
}

// a counter variable for no. of lines
int count=0;

//Loop until end-of-file
while(!inputFile.eof())
{
char c; // a line with max 1024

//This extracts one word a time
inputFile.get(c);

//count only alphabet letters
if(isalpha(c))
count++;
}

//print count result to output file
outputFile<<"Filename: "<<outputFileName<<"\tNumber Of Letters="<<count<<endl;

//closing files
inputFile . close ();
outputFile . close ();
}
void outputNumberOfDigits(const char *inputFileName , const char *outputFileName)
{
//opening file for input
ifstream inputFile (inputFileName , ios :: in );

//opening file for output
ofstream outputFile (outputFileName , ios :: out );

//checking file opening was successful
if (! inputFile )
{
cerr<<"Error opening file:\t"<<inputFileName<<endl ;
exit (1);
}
if (! outputFile )
{
cerr<<"Error opening file:\t"<<outputFileName<<endl ;
exit (1);
}

// a counter variable for no. of lines
int count=0;

//Loop until end-of-file
while(!inputFile.eof())
{
char c; // a line with max 1024

//This extracts one word a time
inputFile.get(c);

//count only digits letters
if(isdigit(c))
count++;
}

//print count result to output file
outputFile<<"Filename: "<<outputFileName<<"\tNumber Of Digits="<<count<<endl;

//closing files
inputFile . close ();
outputFile . close ();
}
void outputNumberOfPrintableCharacters(c onst char *inputFileName , const char *outputFileName)
{
//opening file for input
ifstream inputFile (inputFileName , ios :: in );

//opening file for output
ofstream outputFile (outputFileName , ios :: out );

//checking file opening was successful
if (! inputFile )
{
cerr<<"Error opening file:\t"<<inputFileName<<endl ;
exit (1);
}
if (! outputFile )
{
cerr<<"Error opening file:\t"<<outputFileName<<endl ;
exit (1);
}

// a counter variable for no. of lines
int count=0;

//Loop until end-of-file
while(!inputFile.eof())
{
char c; // a line with max 1024

//This extracts one word a time
inputFile.get(c);

//count only printable chars
if(isprint(c))
count++;
}

//print count result to output file
outputFile<<"Filename: "<<outputFileName<<"\tNumber Of Printable Charachters="<<count<<endl;

//closing files
inputFile.close ();
outputFile.close ();
}
  اقتباس المشاركة
قديم 06-13-2007, 08:14 AM   #15
Palestinian Rose
I ♥ SHABAB
 
الصورة الرمزية Palestinian Rose

قوة السمعة: 6 Palestinian Rose will become famous soon enough

Question رد: Help Me Plz in My C++ Assignment

يعطيك العافية يا أخ محمود

بس و الله بصراحة الكود لساتو متل ما هو !! و عم يعطيني نفس النتائج اللي أنا عملتها من أول !!!!
يعني لسه المشاكل اللي فيه موجود !!!
يمكن انت حاولت تضيف Quit للكود ، بس برضو ال program ما بيعمل Quit لما تختار الخيار السادس اللي هو Quit !!!!!!!

عالعموم ، اذا ما حد عرف يساعدني مش مشكلة !! الله يعطيكم العافية على كل حال
انا بحاول أزبطه مرة تانية ، أو بسأل أي حد تاني يساعدني


شكرًا كتير للجميع
  اقتباس المشاركة
قديم 06-13-2007, 10:48 AM   #16
محمود
..{ مديــــــر عــــام }..
 
الصورة الرمزية محمود
عيد فطر سعيد ,,

قوة السمعة: 50 محمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond repute

افتراضي رد: Help Me Plz in My C++ Assignment

مستحيل اختي ^_^

انا ما حطيت الخروج بس ..

بالعكس انا غيرت الشرط




//Check if user entered invalid choice number
if(ch<1 || ch>6)
{
cout<<"No such option. Please enter a number from the list!"<<endl;
return getMenuChoice();
}
else
return ch;

شوفي هون ^_^

وراح تفهمي لحالك انو الشرط كان محدود لـ 5

انا زودته وخليته لـ 6 حتى يقبلها ..

ويدخلها في السويتش ويختار الكييس تاعها الي هوو

انو يطلع من البرنامج ..

حاولى مرة اخرى وراح يضبط معك

للعلم انا ما عندي كمبايلور وياريت تبعتيلي الي عندك

حتى اشوفلك اياه ..

كل التحية ..

التعديل الأخير تم بواسطة محمود ; 06-13-2007 الساعة 10:50 AM.
  اقتباس المشاركة
قديم 06-13-2007, 08:39 PM   #17
Palestinian Rose
I ♥ SHABAB
 
الصورة الرمزية Palestinian Rose

قوة السمعة: 6 Palestinian Rose will become famous soon enough

افتراضي رد: Help Me Plz in My C++ Assignment

مرحبا

آسفه على الرد المتأخر !! بس والله مشغولة بامتحاناتي و البحوث و الواجبات اللي ما بتخلص !!!

و مش عارفه يا أخ محمود كيف أبعتلك اللي انت طلبتو !!! بس رح أحاول بعدين ان شا الله في ال weekend

بس انا متأكده ان الكود اللي انت عدلتلي ياه لسه ما تعدل !! و لسه بيعطيني نفس النتيجة !!!

its ok

انا ان شاء الله بحكي معك بعدين
لأني كتير مشغولة والله

مع الســــلامة
  اقتباس المشاركة
قديم 06-14-2007, 08:05 AM   #18
محمود
..{ مديــــــر عــــام }..
 
الصورة الرمزية محمود
عيد فطر سعيد ,,

قوة السمعة: 50 محمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond repute

افتراضي رد: Help Me Plz in My C++ Assignment

اوكي اختي الكريمة ،،

اضغطي الملف وارفعيه على روسانا

www.rooosana.ps

وهاتي الرابط الي بطلع معك ، وانا بخدمتكـ ^^
  اقتباس المشاركة
قديم 06-14-2007, 07:47 PM   #19
Palestinian Rose
I ♥ SHABAB
 
الصورة الرمزية Palestinian Rose

قوة السمعة: 6 Palestinian Rose will become famous soon enough

افتراضي رد: Help Me Plz in My C++ Assignment

مرحبا

بصراحة يا أخوي انا مش عارفة انت شو بالضبط بدك ياني أبعت !!!
بدك أبعتلك البرنامج اللي بيشغل الكود ، إللي هو Microsoft Visual C++ 6.0 ?!?
ولا قصدك أبعتلك ال output تبع الأستاذ اللي لازم نعمل متلو ؟؟؟

عالعموم ، أنا رح أبعتلك كل شي

فيك تنزل البرنامج تبع ال C+ من هاد الموقع : http://msdn2.microsoft.com/en-us/vstudio/aa718364.aspxأنا بصراحة نزلت البرنامج من CD كان موجود مع كتاب ال C+ !!

و جربت ابعتلك كل شي بيخص ال assignment على الموقع اللي انت قلتللي عليه
بس ال output تبع الأستاذ مش راضي ينبعت!! عشان هيك رح أبعث صور منو لحتى تشوف وين المشاكل و الاختلافات اللي في ال output تبعي و ال output تبع الأستاذ


هاي الأشياء اللي عملتلها upload في موقع Rooosana :

1) ال handout اللي أعطانا اياها الأستاذ اذا حابب تشوفها
http://www.rooosana.ps/Down.php?d=9ugB




2) الكود تبع ال assignment اللي أنا عملتو بعد ما عدلتو
و هو بصراحة تعدل الحين كتير عن أول بعد كتير من المساعدات
يعني هلأ صار يعمل Quit و يطلع من البرنامج ، و صار يطبع ال results في الoutput ..
بس برضو لساتو ناقصو شوية أشياء لحتى يصير تمامًا مطابق لتبع الأستاذ ، اللي هو طبعًا مطلوب منا !!
فإنت شوف الكود تبعي و اعملو run ، و رح أبعتلك متل ما قلت الصور من ال output تبع الأستاذ لحتى تشوف انت الفرق !!

هاد الكود تبعي
http://www.rooosana.ps/Down.php?d=jjpu




3) صور لل output تبع الأستاذ

1- picture of the MAIN MENU
http://www.rooosana.ps/Down.php?d=Ivyd

2- After choosing one of the menu selections
http://www.rooosana.ps/Down.php?d=FPaQ

3- Entering the name of the output and input files we want to open and read
http://www.rooosana.ps/Down.php?d=ASvu

4-Getting the result after reading the files , and then display the menu again
http://www.rooosana.ps/Down.php?d=rYM4

5- When choosing a selection not between (1-6) , the menu will be displayed again
http://www.rooosana.ps/Down.php?d=jYyU

6-Choosing to Quit from the whole program
http://www.rooosana.ps/Down.php?d=Qtx1
  اقتباس المشاركة
قديم 06-15-2007, 11:11 AM   #20
محمود
..{ مديــــــر عــــام }..
 
الصورة الرمزية محمود
عيد فطر سعيد ,,

قوة السمعة: 50 محمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond repute

افتراضي رد: Help Me Plz in My C++ Assignment

اوك اختي انا بنزل البرنامج ،،

وبشوفلك اياه ،،

لاني انا مبرمج
java

javascript

php

C

pascal

QBasic


وبعض اللغات الخفيفة

انا قرأت الشروحات على اللغه لقيتها حلوة ^^

بس ما تقلقي البرمجة نفس الفكر يعني راح انزله واشوف المشكلة من وين

بالضبط ، على امل انو نصل حل للمشكلة مع اني متأكد انو المشروع تمام (:

بس راح اعاينه بنفسي ..
  اقتباس المشاركة
إضافة رد


الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1)
 

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

BB code is متاحة
كود [IMG] متاحة
كود HTML معطلة

الانتقال السريع


الساعة الآن 11:53 PM.