i hv more problem !! >.< ...
» Click to show Spoiler - click again to hide... «
// testing to create horoscope program
#include <iostream>
#include <string>
#include <sstream>
using namespace std;
#define NEWLINE '\n'
string day,month,Mode_s_e,Mode_s_c,Mode_l,back,back1,month_w,horoscope_we,horoscope_wc,horoscope_w,select_option;
int d,h,m,l,se,sc,so,y,z;
int main ()
{
loop_select_language:
cout << "Select 1 for English" << endl;
cout << "Select 2 for Mandarin" << endl;
cout << NEWLINE;
cout << "Select : ";
getline (cin,Mode_l);
stringstream(Mode_l) >> l;
switch (l) {
case 1:
cout << "English is selected" << endl;
cout << NEWLINE;
goto loop_select_english;
break;
case 2:
cout << "华语已被选择" << endl;
cout << NEWLINE;
goto loop_select_mandarin;
break;
default:
cout << "No language is selected" << endl;
cout << "proceed to language selection again ...";
cout << "Please select the language accordding to the options given";
cout << NEWLINE;
goto loop_select_language;
}
loop_select_english:
cout << "Select 1 for Horoscope Calculation" << endl;
cout << "Select 2 for Horoscope Characteristic" << endl;
cout << "Select 3 for Horoscope Story" << endl;
cout << "Select 4 for Horoscope Matching" << endl;
cout << "Select 5 for Horoscope Bloody Calculation" << endl;
cout << "Select 6 for Fate Analysis" << endl;
cout << "Select 7 to end Horoscope Application" << endl;
cout << "Select 8 to about the application" << endl;
cout << NEWLINE;
cout << "Mode selected : ";
getline (cin, Mode_s_e);
stringstream(Mode_s_e) >> se;
if (se==1) {
cout << "Mode 1 being selected" << endl;
cout << "Proceed to Horoscope Calculation Section" << endl;
cout << NEWLINE;
goto Mode_1_english;
}
else if (se==2) {
cout << "Mode 2 being selected" << endl;
cout << "Proceed to Horoscope Characteristic Section" << endl;
cout << NEWLINE;
goto Mode_2_english;
}
else if (se==3) {
cout << "Mode 3 being selected" << endl;
cout << "Proceed to Horoscope Story Section" << endl;
cout << NEWLINE;
goto Mode_3_english;
}
else if (se==4) {
cout << "Mode 4 being selected" << endl;
cout << "Proceed to Horoscope Matching Section" << endl;
cout << NEWLINE;
goto Mode_4_english;
}
else if (se==5) {
cout << "Mode 5 being selected" << endl;
cout << "Proceed to Horoscope Calculation Section" << endl;
cout << NEWLINE;
goto Mode_5_english;
}
else if (se==6) {
cout << "Mode 6 being selected" << endl;
cout << "Proceed to Fate Analysis" << endl;
cout << NEWLINE;
goto Mode_6_english;
}
else if (se==7) {
cout << "Mode 7 being selected" << endl;
cout << "Closeing the program" << endl;
cout << NEWLINE;
goto terminate;
}
else if (se==8) {
cout << "Mode 8 being selected" << endl;
cout << "About" << endl;
cout << "Horoscope 2010 Dual Language trial Version bought to you by Dark Angel Rain Forest,Noskcad Sim" << endl;
cout << "Copyright reverse by RuinSpirit" << endl;
cout << "Autogenerate ..." << endl;
cout << NEWLINE;
goto back_english;
}
else {
cout << "No mode selected" << endl;
cout << "Please select again" << endl;
cout << NEWLINE;
goto loop_select_english;
}
loop_select_mandarin:
cout << "请选择\'一\'进入星座计算" << endl;
cout << "请选择\'二\'进入星座特性" << endl;
cout << "请选择\'三\'进入星座故事" << endl;
cout << "请选择\'四\'进入星座配对" << endl;
cout << "请选择\'五\'进入血与星座" << endl;
cout << "请选择\'六\'进入八字命评" << endl;
cout << "请选择\'七\'进入结束星座应用" << endl;
cout << "请选择\'八\'进入关于" << endl;
cout << NEWLINE;
cout << "模式选择 : ";
getline (cin, Mode_s_c);
stringstream(Mode_s_c) >> sc;
if (sc==1) {
cout << "模式\'一\'被选则" << endl;
cout << "代入星座计算环节" << endl;
cout << NEWLINE;
goto Mode_1_mandarin;
}
else if (sc==2) {
cout << "模式\'二\'被选则" << endl;
cout << "代入星座特性环节" << endl;
cout << NEWLINE;
goto Mode_2_mandarin;
}
else if (sc==3) {
cout << "模式\'三\'被选则" << endl;
cout << "代入星座故事环节" << endl;
cout << NEWLINE;
goto Mode_3_mandarin;
}
else if (sc==4) {
cout << "模式\'四\'被选则" << endl;
cout << "代入星座配对环节" << endl;
cout << NEWLINE;
goto Mode_4_mandarin;
}
else if (sc==5) {
cout << "模式\'五\'被选则" << endl;
cout << "代入血与星座环节" << endl;
cout << NEWLINE;
goto Mode_5_mandarin;
}
else if (sc==6) {
cout << "模式\'六\'被选则" << endl;
cout << "代入八字命评环节" << endl;
cout << NEWLINE;
goto Mode_6_mandarin;
}
else if (sc==7) {
cout << "模式\'七\'被选则" << endl;
cout << "代入结束星座应用环节" << endl;
cout << NEWLINE;
goto terminate;
}
else if (sc==8) {
cout << "模式\'八\'被选则" << endl;
cout << "代入关于环节" << endl;
cout << "星座 2010 双语言使用版本来至 Dark Angel Rain Forest, Noskcad Sim" << endl;
cout << "Copyright by RuinSpirit" << endl;
cout << "自动跳回 ..." << endl;
cout << NEWLINE;
goto back_mandarin;
}
else {
cout << "输入错误的选择" << endl;
cout << "请再次输入" << endl;
cout << NEWLINE;
goto loop_select_mandarin;
}
back_english:
cout << "To go to Mode selection, please press \'1\' \n" << endl;
cout << "To end the program, please press \'2\' \n" << endl;
cout << "Select : " ;
cout << NEWLINE;
getline (cin, back);
stringstream(back) >> y;
if (y==1) {
cout << "Go back to Mode selection.";
cout << "proceeding...." << endl;
cout << NEWLINE;
goto loop_select_english;
}
else if (y=2) {
cout << "Proceeding to application termination" << endl;
cout << NEWLINE;
goto terminate;
}
else {
cout << "Please key in again" << endl;
cout << NEWLINE;
goto back_english;
}
back_mandarin:
cout << "回到模式选择,请输入 \'一\' \n" << endl;
cout << "结束星座应用软件,请输入 \'二\' \n" << endl;
cout << "输入 : " ;
getline (cin, back);
stringstream(back) >> y;
if (y==1) {
cout << "自动跳回模式选择。。。";
cout << "前进。。。。" << endl;
cout << NEWLINE;
goto loop_select_mandarin;
}
else if (y=2) {
cout << "前进结束星座应用软件。。。" << endl;
cout << NEWLINE;
goto terminate;
}
else {
cout << "输入错误,请再次输入!!" << endl;
cout << "自动跳回模式互动" << endl;
cout << NEWLINE;
goto back_mandarin;
}
Mode_1_english: //Horoscope Calculation Englsih
cout << "Please key in ur birth of day (1-31) : ";
getline (cin, day);
stringstream(day) >> d;
cout << "please enter your birth of month (1-12) : ";
getline (cin, month);
stringstream(month) >> m;
if (m==1) month_w="January";
if (m==2) month_w="Febuary";
if (m==3) month_w="March";
if (m==4) month_w="April";
if (m==5) month_w="May";
if (m==6) month_w="June";
if (m==7) month_w="July";
if (m==8) month_w="August";
if (m==9) month_w="Semptember";
if (m==10) month_w="October";
if (m==11) month_w="November";
if (m==12) month_w="december";
if (((m==3) && (21<=d<=31) || (m==4) && (1<=d<=20)) && (l=1)) horoscope_w ="Aries";
if (((m==3) && (21<=d<=31) || (m==4) && (1<=d<=20)) && (l=2)) horoscope_wc ="山羊座";
if (((m==4) && (21<=d<=30) || (m==5) && (1<=d<=21)) && (l=1)) horoscope_we ="Taurus";
if (((m==4) && (21<=d<=30) || (m==5) && (1<=d<=21)) && (l=2)) horoscope_wc ="金牛座";
if (((m==5) && (22<=d<=31) || (m==6) && (1<=d<=21)) && (l=1)) horoscope_we = "Gemini";
if (((m==5) && (22<=d<=31) || (m==6) && (1<=d<=21)) && (l=2)) horoscope_wc = "双子座";
if (((m==6) && (22<=d<=30) || (m==7) && (1<=d<=22)) && (l=1)) horoscope_we = "Cancer";
if (((m==6) && (22<=d<=30) || (m==7) && (1<=d<=22)) && (l=2)) horoscope_wc = "巨蟹座";
if (((m==7) && (23<=d<=31) || (m==8) && (1<=d<=22)) && (l=1)) horoscope_we = "Leo";
if (((m==7) && (23<=d<=31) || (m==8) && (1<=d<=22)) && (l=2)) horoscope_wc = "狮子座";
if (((m==8) && (23<=d<=31) || (m==9) && (1<=d<=23)) && (l=1)) horoscope_we = "Virgo";
if (((m==8) && (23<=d<=31) || (m==9) && (1<=d<=23)) && (l=2)) horoscope_wc = "处女座";
if (((m==9) && (24<=d<=30) || (m==10) && (1<=d<=23)) && (l=1)) horoscope_we = "Libra";
if (((m==9) && (24<=d<=30) || (m==10) && (1<=d<=23)) && (l=2)) horoscope_wc = "天枰座";
if (((m==10) && (24<=d<=31) || (m==11) && (1<=d<=22)) && (l=1)) horoscope_we = "Scorpio";
if (((m==10) && (24<=d<=31) || (m==11) && (1<=d<=22)) && (l=1)) horoscope_wc = "天蝎座";
if (((m==11) && (23<=d<=30) || (m==12) && (1<=d<=21)) && (l=1)) horoscope_we = "Sagittarius";
if (((m==11) && (23<=d<=30) || (m==12) && (1<=d<=21)) && (l=1)) horoscope_wc = "射手座";
if (((m==12) && (22<=d<=31) || (m==1) && (1<=d<=20)) && (l=1)) horoscope_we = "Capricorn";
if (((m==12) && (22<=d<=31) || (m==1) && (1<=d<=20)) && (l=1)) horoscope_wc = "魔蟹座";
if (((m==1) && (21<=d<=31) || (m==2) && (1<=d<=18)) && (l=1)) horoscope_we = "Aquarius";
if (((m==1) && (21<=d<=31) || (m==2) && (1<=d<=18)) && (l=1)) horoscope_wc = "水瓶座";
if (((m==2) && (19<=d<=31) || (m==3) && (1<=d<=20)) && (l=1)) horoscope_we = "Pisces";
if (((m==2) && (19<=d<=31) || (m==3) && (1<=d<=20)) && (l=1)) horoscope_wc = "双鱼座";
if (((m==3) && (21<=d<=31) || (m==4) && (1<=d<=20)) && (l=1)) horoscope_w ="Aries";
if (((m==3) && (21<=d<=31) || (m==4) && (1<=d<=20)) && (l=2)) horoscope_w ="山羊座";
if (((m==4) && (21<=d<=30) || (m==5) && (1<=d<=21)) && (l=1)) horoscope_w ="Taurus";
if (((m==4) && (21<=d<=30) || (m==5) && (1<=d<=21)) && (l=2)) horoscope_w ="金牛座";
if (((m==5) && (22<=d<=31) || (m==6) && (1<=d<=21)) && (l=1)) horoscope_w = "Gemini";
if (((m==5) && (22<=d<=31) || (m==6) && (1<=d<=21)) && (l=2)) horoscope_w = "双子座";
if (((m==6) && (22<=d<=30) || (m==7) && (1<=d<=22)) && (l=1)) horoscope_w = "Cancer";
if (((m==6) && (22<=d<=30) || (m==7) && (1<=d<=22)) && (l=2)) horoscope_w = "巨蟹座";
if (((m==7) && (23<=d<=31) || (m==8) && (1<=d<=22)) && (l=1)) horoscope_w = "Leo";
if (((m==7) && (23<=d<=31) || (m==8) && (1<=d<=22)) && (l=2)) horoscope_w = "狮子座";
if (((m==8) && (23<=d<=31) || (m==9) && (1<=d<=23)) && (l=1)) horoscope_w = "Virgo";
if (((m==8) && (23<=d<=31) || (m==9) && (1<=d<=23)) && (l=2)) horoscope_w = "处女座";
if (((m==9) && (24<=d<=30) || (m==10) && (1<=d<=23)) && (l=1)) horoscope_w = "Libra";
if (((m==9) && (24<=d<=30) || (m==10) && (1<=d<=23)) && (l=2)) horoscope_w = "天枰座";
if (((m==10) && (24<=d<=31) || (m==11) && (1<=d<=22)) && (l=1)) horoscope_w = "Scorpio";
if (((m==10) && (24<=d<=31) || (m==11) && (1<=d<=22)) && (l=1)) horoscope_w = "天蝎座";
if (((m==11) && (23<=d<=30) || (m==12) && (1<=d<=21)) && (l=1)) horoscope_w = "Sagittarius";
if (((m==11) && (23<=d<=30) || (m==12) && (1<=d<=21)) && (l=1)) horoscope_w = "射手座";
if (((m==12) && (22<=d<=31) || (m==1) && (1<=d<=20)) && (l=1)) horoscope_w = "Capricorn";
if (((m==12) && (22<=d<=31) || (m==1) && (1<=d<=20)) && (l=1)) horoscope_w = "魔蟹座";
if (((m==1) && (21<=d<=31) || (m==2) && (1<=d<=18)) && (l=1)) horoscope_w = "Aquarius";
if (((m==1) && (21<=d<=31) || (m==2) && (1<=d<=18)) && (l=1)) horoscope_w = "水瓶座";
if (((m==2) && (19<=d<=31) || (m==3) && (1<=d<=20)) && (l=1)) horoscope_w = "Pisces";
if (((m==2) && (19<=d<=31) || (m==3) && (1<=d<=20)) && (l=1)) horoscope_w = "双鱼座";
if ((m==3) && (21<=d<=31) || (m==4) && (1<=d<=20)) h=1;
if ((m==4) && (21<=d<=30) || (m==5) && (1<=d<=21)) h=2;
if ((m==5) && (22<=d<=31) || (m==6) && (1<=d<=21)) h=3;
if ((m==6) && (22<=d<=30) || (m==7) && (1<=d<=22)) h=4;
if ((m==7) && (23<=d<=31) || (m==8) && (1<=d<=22)) h=5;
if ((m==8) && (23<=d<=31) || (m==9) && (1<=d<=23)) h=6;
if ((m==9) && (24<=d<=30) || (m==10) && (1<=d<=23)) h=7;
if ((m==10) && (24<=d<=31) || (m==11) && (1<=d<=22)) h=8;
if ((m==11) && (23<=d<=30) || (m==12) && (1<=d<=21)) h=9;
if ((m==12) && (22<=d<=31) || (m==1) && (1<=d<=20)) h=10;
if ((m==1) && (21<=d<=31) || (m==2) && (1<=d<=18)) h=11;
if ((m==2) && (19<=d<=31) || (m==3) && (1<=d<=20)) h=12;
if ((m==3) && (21<=d<=31) || (m==4) && (1<=d<=19)) {
cout << d << " " << month_w << endl;
cout << "Your Horoscope is \'Aries\'";
cout << NEWLINE;
goto selection;
}
else if ((m==4) && (20<=d<=30) || (m==5) && (1<=d<=20)) {
cout << d << " " << month_w << endl;
cout << "Your Horoscope is \'Taurus\'";
cout << NEWLINE;
goto selection;
}
else if ((m==5) && (21<=d<=31) || (m==6) && (1<=d<=21)) {
cout << d << " " << month_w << endl;
cout << "Your Horoscope is \'Gemini\' ";
cout << NEWLINE;
goto selection;
}
else if ((m==6) && (22<=d<=30) || (m==7) && (1<=d<=22)) {
cout << d << " " << month_w << endl;
cout << "Your Horoscope is \'Cancer\'";
cout << NEWLINE;
goto selection;
}
else if ((m==7) && (23<=d<=31) || (m==8) && (1<=d<=22)) {
cout << d << " " << month_w << endl;
cout << "Your Horoscope is \'Leo\'";
cout << NEWLINE;
goto selection;
}
else if ((m==8) && (23<=d<=31) || (m==9) && (1<=d<=22)) {
cout << d << " " << month_w << endl;
cout << "Your Horoscope is \'Virgo\'";
cout << NEWLINE;
goto selection;
}
else if ((m==9) && (23<=d<=30) || (m==10) && (1<=d<=22)) {
cout << d << " " << month_w << endl;
cout << "Your Horoscope is \'Libra\' ";
cout << NEWLINE;
goto selection;
}
else if ((m==10) && (23<=d<=31) || (m==11) && (1<=d<=21)) {
cout << d << " " << month_w << endl;
cout << "Your Horoscope is \'Scorpio\'";
cout << NEWLINE;
goto selection;
}
else if ((m==11) && (22<=d<=30) || (m==12) && (1<=d<=21)) {
cout << d << " " << month_w << endl;
cout << "Your Horoscope is \'Sagittarius\'";
cout << NEWLINE;
goto selection;
}
else if ((m==12) && (22<=d<=31) || (m==1) && (1<=d<=19)) {
cout << d << " " << month_w << endl;
cout << "Your Horoscope is \'Capricorn\'";
cout << NEWLINE;
goto selection;
}
else if ((m==1) && (20<=d<=31) || (m==2) && (1<=d<=18)) {
cout << d << " " << month_w << endl;
cout << "Your Horoscope is \'Aquarius\'";
cout << NEWLINE;
goto selection;
}
else if ((m==2) && (19<=d<=31) || (m==3) && (1<=d<=20)) {
cout << d << " " << month_w << endl;
cout << "Your Horoscope is \'Pisces\'";
cout << NEWLINE;
goto selection;
}
else {
cout << "Data key in not found in the program" << endl;
cout << "Please try again";
cout << NEWLINE;
goto Mode_1_english;
}
Mode_1_mandarin: //Horoscope Calculation mnadarin
cout << "请输入你(妳)的生日日期 (1-31) : ";
getline (cin, day);
stringstream(day) >> d;
cout << "请输入你(妳)的生日月份 (1-12) : ";
getline (cin, month);
stringstream(month) >> m;
if (m==1) month_w="一月";
if (m==2) month_w="二月";
if (m==3) month_w="三月";
if (m==4) month_w="四月";
if (m==5) month_w="五月";
if (m==6) month_w="六月";
if (m==7) month_w="七月";
if (m==8) month_w="八月";
if (m==9) month_w="九月";
if (m==10) month_w="十月";
if (m==11) month_w="十一月";
if (m==12) month_w="十二月";
if ((m==3) && (21<=d<=31) || (m==4) && (1<=d<=20)) {
cout << d << " " << month_w << endl;
cout << "你的星座是 \'山羊座\'";
cout << NEWLINE;
goto selection;
}
else if ((m==4) && (21<=d<=30) || (m==5) && (1<=d<=21)) {
cout << d << " " << month_w << endl;
cout << "Your Horoscope is \'金牛座\'";
cout << NEWLINE;
goto selection;
}
else if ((m==5) && (22<=d<=31) || (m==6) && (1<=d<=21)) {
cout << d << " " << month_w << endl;
cout << "Your Horoscope is \'双子座\'";
cout << NEWLINE;
goto selection;
}
else if ((m==6) && (22<=d<=30) || (m==7) && (1<=d<=22)) {
cout << d << " " << month_w << endl;
cout << "Your Horoscope is \'巨蟹座\'";
cout << NEWLINE;
goto selection;
}
else if ((m==7) && (23<=d<=31) || (m==8) && (1<=d<=22)) {
cout << d << " " << month_w << endl;
cout << "Your Horoscope is \'狮子座\'";
cout << NEWLINE;
goto selection;
}
else if ((m==8) && (23<=d<=31) || (m==9) && (1<=d<=23)) {
cout << d << " " << month_w << endl;
cout << "Your Horoscope is \'处女座\'";
cout << NEWLINE;
goto selection;
}
else if ((m==9) && (24<=d<=30) || (m==10) && (1<=d<=23)) {
cout << d << " " << month_w << endl;
cout << "Your Horoscope is \'天枰座\'";
cout << NEWLINE;
goto selection;
}
else if ((m==10) && (24<=d<=31) || (m==11) && (1<=d<=22)) {
cout << d << " " << month_w << endl;
cout << "Your Horoscope is \'天蝎座\'";
cout << NEWLINE;
goto selection;
}
else if ((m==11) && (23<=d<=30) || (m==12) && (1<=d<=21)) {
cout << d << " " << month_w << endl;
cout << "Your Horoscope is \'射手座\'";
cout << NEWLINE;
goto selection;
}
else if ((m==12) && (22<=d<=31) || (m==1) && (1<=d<=20)) {
cout << d << " " << month_w << endl;
cout << "Your Horoscope is \'魔蟹座\'";
cout << NEWLINE;
goto selection;
}
else if ((m==1) && (21<=d<=31) || (m==2) && (1<=d<=18)) {
cout << d << " " << month_w << endl;
cout << "Your Horoscope is \'水瓶座\'";
cout << NEWLINE;
goto selection;
}
else if ((m==2) && (19<=d<=31) || (m==3) && (1<=d<=20)) {
cout << d << " " << month_w << endl;
cout << "Your Horoscope is \'双鱼座\'";
cout << NEWLINE;
goto selection;
}
else {
cout << "Data key in not found in the program" << endl;
cout << "Please try again";
cout << NEWLINE;
goto Mode_1_mandarin;
}
selection:
switch (l) {
case 1:
cout << NEWLINE;
cout << "To Display the Characteristic of " << horoscope_we << " Please press \'1\' " << endl;
cout << "To Display the story of " << horoscope_we << " Please press \'2\' " << endl;
cout << "Please press \'3\' to exist" << endl;
cout << "Select : ";
getline (cin,select_option);
stringstream(select_option) >> so;
if (so==1) goto show_characteristic;
if (so==2) goto show_story;
if (so==3) goto terminate;
break;
case 2 :
cout << NEWLINE;
cout << "看 \'" << horoscope_wc << "\' 星座特性,请按 \'一\' " << endl;
cout << "看 \'" << horoscope_wc << "\' 星座故事,请按 \'二\' " << endl;
cout << "退出,请按 \'三\'" << endl;
cout << "选择 : ";
getline (cin,select_option);
stringstream(select_option) >> so;
if (so=1) goto show_characteristic;
if (so=2) goto show_story;
if (so=3) goto terminate;
break;
default:
if (l!= 1) goto loop_error_english;
if (l!= 2) goto loop_error_mandarin;
}
show_characteristic:
switch (h) {
case 1:
if ((l=1) && ((m==3) && (21<=d<=31) || (m==4) && (1<=d<=20))) cout << "this this this" << endl;
if ((l=2) && ((m==3) && (21<=d<=31) || (m==4) && (1<=d<=20))) cout << "this this this" << endl;
break;
case 2:
if (l=1) cout << "this this this" << endl;
if (l=2) cout << "this this this" << endl;
break;
case 3:
if (l=1) cout << "this this this" << endl;
if (l=2) cout << "this this this" << endl;
break;
case 4:
if (l=1) cout << "this this this" << endl;
if (l=2) cout << "this this this" << endl;
break;
case 5:
if (l=1) cout << "this this this" << endl;
if (l=2) cout << "this this this" << endl;
break;
case 6:
if (l=1) cout << "this this this" << endl;
if (l=2) cout << "this this this" << endl;
break;
case 7:
if (l=1) cout << "this this this" << endl;
if (l=2) cout << "this this this" << endl;
break;
case 8:
if (l=1) cout << "this this this" << endl;
if (l=2) cout << "this this this" << endl;
break;
case 9:
if (l=1) cout << "this this this" << endl;
if (l=2) cout << "this this this" << endl;
break;
case 10:
if (l=1) cout << "this this this" << endl;
if (l=2) cout << "this this this" << endl;
break;
case 11:
if (l=1) cout << "this this this" << endl;
if (l=2) cout << "this this this" << endl;
break;
case 12:
if (l=1) cout << "this this this" << endl;
if (l=2) cout << "this this this" << endl;
break;
default:
if (l=1) goto loop_error_english;
if (l=2) goto loop_error_mandarin;
}
show_story:
back1_english:
cout << NEWLINE;
cout << "To reselect language, please press \'1\' " << endl;
cout << "To go to Mode selection, please press \'2\' " << endl;
cout << "To play again, please press \'3\' " << endl;
cout << "To end the program, please press \'4\' " << endl;
cout << NEWLINE;
cout << "Select : " ;
getline (cin, back);
stringstream(back) >> z;
if (z==1) {
cout << "Reselect language" << endl;
cout << NEWLINE;
goto loop_select_language;
}
else if (z==2) {
cout << "Go back to Mode selection." << endl;
cout << "proceeding....";
cout << NEWLINE;
goto loop_select_english;
}
else if (z==3) {
cout << "Horoscope Calculation selected.... loading...";
cout << NEWLINE;
goto Mode_1_english;
}
else if (z=4) {
cout << "Proceeding to application termination" << endl;
cout << NEWLINE;
goto terminate;
}
back1_mandarin:
cout << NEWLINE;
cout << "回到选择语言,请按 \'一\' " << endl;
cout << "回到模式选择,请按 \'二\' " << endl;
cout << "在次回到选的模式,请按 \'三\' " << endl;
cout << "结束此软件,请按 \'四\' " << endl;
cout << NEWLINE;
cout << "输入 : ";
getline (cin, back);
stringstream(back) >> z;
if (z==1) {
cout << "从选语言。" << endl;
cout << NEWLINE;
goto loop_select_language;
}
else if (z==2) {
cout << "返回模式选择。";
cout << "proceeding....";
cout << NEWLINE;
goto loop_select_mandarin;
}
else if (z==3) {
cout << "自动跳回星座计算。。。。。带入。。。";
cout << NEWLINE;
goto Mode_1_mandarin;
}
else if (z==4) {
cout << "进入结束软件。。。" << endl;
cout << NEWLINE;
goto terminate;
}
Mode_2_english:
Mode_2_mandarin:
Mode_3_english:
Mode_3_mandarin:
Mode_4_english:
Mode_4_mandarin:
Mode_5_english:
Mode_5_mandarin:
Mode_6_english:
Mode_6_mandarin:
loop_error_english:
cout << "error " << endl;
goto terminate;
loop_error_mandarin:
cout << "系统错误" << endl;
goto terminate;
terminate:
if (l=1) cout << "Thank you" << endl;
return 0;
if (l=2) cout << "谢谢" << endl;
return 0;
return 0;
}
I'm hving problem in the selection: and tje show_characteristic !!
BI can pass it but shown wrong chinese word !! suppose show bi !!
mandarin can not even pass through direct to my error termination >.<
Added on November 29, 2009, 9:11 pmQUOTE(lee_what2004 @ Nov 29 2009, 08:29 PM)
can not do like this (21<=d<=31)
need to split it up (21<=d) && (d<=31)
but the system can read it ...
after i add l=1 .. then error or (l=1 || 1=2)
terrible !!
the switch (l)
can not determine which language to use >.<
This post has been edited by Dackson: Nov 29 2009, 09:11 PM