Ciao raga , ho allegato un codice sorgente che mi sta creando dei problemi . Non c'e' nulla che non vada in compilazione ma in esecuzione si . line 65 if (subpagestr > "1") line 66 { Lo ho usato allo stesso modo anche in altri punti del codice e non mi ha dato problemi . Il problema sta nel fatto che la condizione 'subpagestr > "1"' risulta sempre vera anche quando non lo e' ! Dove ¢Æ««Ø sto sbagliando ? Grazie a tutti . ;) -- SystemFAILURE BioHazard Email address :: root@xxxxxxxxxxxxxxxxxxxxxxxxxx Internet Relay Chat :: SystemFAILURE @ #HUF @ irc.evoirc.org Micro$oft Network :: msn@xxxxxxxxxxxxxxxxxxxxxxxxxx Jabber :: root@xxxxxxxxxxxxxxxxxxxxxxxxxx // HUF Founder /* Heaven Knows That I Love YOU :**: */ /* I will never let you fall , I'll stand up with you forever .. I'll be there for you through it all , Even if saving you sends me to Heaven :*: */ ProShell System Administrator // it was wonderful , many thanks to all
/* * Rai National TeleViDeo Explorer v1.0 * * Made by SystemFAILURE BioHazard * root@xxxxxxxxxxxxxxxxxxxxxxxxxx * Hackers United Force * * A very simple and intuitive Rai national TVD * explorer (so channels Rai 1 and Rai 2) using * an Internet connection . * * ADDITIONAL NOTES :: * If you want to use an alternative image viewer , * modify 'eog' in the 'cmd' string with what you * want to use . * * Development begin date :: 04/11/2008 15:12 CEST * Development end date :: 04/11/2008 15:47 CEST * */ #include <iostream> #include <string> #include <stdlib.h> using namespace std; int main(void) { // software vars int choice; string pagestr; string subpagestr; // banner cout << "Rai National TeleViDeo Explorer v1.0" << endl; cout << "Made by SystemFAILURE BioHazard" << endl; cout << "root@xxxxxxxxxxxxxxxxxxxxxxxxxx" << endl; cout << "Hackers United Force" << endl << endl; // let's go ! while (true) { pagestr = "0"; subpagestr = "0"; cout << "What do you want to do ?" << endl; cout << "0) Exit" << endl; cout << "1) Get a TVD page" << endl; cout << "Type your choice number :: "; cin >> choice; cout << endl; switch(choice) { case 0: cout << "Thank you for trying this little software ." << endl; return 0; case 1: while (pagestr < "1" || pagestr > "850") { cout << "Page number from 1 to 850 (going over 800 may cause errors) :: "; cin >> pagestr; }; while (subpagestr < "1" || subpagestr > "3") { cout << "Subpage number (1 for no subpage OR 2 OR 3) :: "; cin >> subpagestr; }; if (subpagestr > "1") { string cmd__pre = "cd /tmp/ && wget http://www.televideo.rai.it/televideo/pub/tt4web/Nazionale/page-";; string cmd = cmd__pre + pagestr + "." + subpagestr + ".png && " + "eog ./page-" + pagestr + "." + subpagestr + ".png"; system(cmd.c_str()); break; }; string cmd__pre = "cd /tmp/ && wget http://www.televideo.rai.it/televideo/pub/tt4web/Nazionale/page-";; string cmd = cmd__pre + pagestr + "." + subpagestr + ".png && " + "eog ./page-" + pagestr + ".png"; system(cmd.c_str()); break; //default: //cout << "You can choose 0 OR 1 , nothing else ." << endl; }; }; };