Herzlich Willkommen, lieber Gast!
  Sie befinden sich hier:

  Forum » Rätselecke » 3*17. Virtual Rästel: Zielgerichteter Wurm

Forum | Hilfe | Team | Links | Impressum | > Suche < | Mitglieder | Registrieren | Einloggen
  Quicklinks: MSDN-Online || STL || clib Reference Grundlagen || Literatur || E-Books || Zubehör || > F.A.Q. < || Downloads   

Autor Thread - Seiten: [ 1 ] > 2 < [ 3 ]
010
26.09.2003, 10:31 Uhr
virtual
Sexiest Bit alive
(Operator)



Zitat:
Windalf postete

C++:
     if(argc > 2) // Hilfe ausgeben
     {
        cout<<"Also nochmal für die Linuxuser: ES WIRD NUR GENAU EIN PARAMETER UEBERGEBEN UND DAS IST DER NAME DER EINZULESENDEN DATEI. ALSO JEDER NUR EIN KREUZ. IST DAS SO SCHWER ZU VERSTEHEN ZUM HENKER NOCH MAL!!!";
     }




hat Spass gemacht mitzuspielen



Und für die Windows User: Hättest Du die Aufgabenstellung genau gelesen, hättest Du gemerkt, daß das if(argc>2) eine von einem Linuxuser gestellte Falle ist, in die nur Windowsuser reintappen können: Gemäß der Aufgabenstellung wird dem Programm nämlich kein Parameter übergeben. Ganz windowslike ist hier nänmlich alles fest verdrahtet und unabänderlich (Die datei heißt immer "dictionary"), damit die Damen und Herren der MS Fraktion nicht überfordert werden .
--
Gruß, virtual
Quote of the Month
Ich eß' nur was ein Gesicht hat (Creme 21)
 
Profil || Private Message || Suche Download || Zitatantwort || Editieren || Löschen || IP
011
26.09.2003, 11:25 Uhr
0xdeadbeef
Gott
(Operator)


Ich ignoriere Windalfs Änderung mal, weil sie Regel 4 verletzt (namespaces vergessen. Typisch Windows-Coder )

C++:
#include <iostream>
#include <fstream>
#include <string>
#include <list>

#define DICFILE "dictionary"

bool checkMatch(
     const std::string& muster,
     std::string wort)
{
     return true;
}

int main(int argc, char** argv)
{
     if(argc > 2) // Hilfe ausgeben
     {
     }

     std::cout << "Geben Sie das Musterwort ein: ";    
     std::string input;
     std::cin >> input;
     std::ifstream dic(DICFILE);
     std::list<std::string> wordlist;
}


--
Einfachheit ist Voraussetzung für Zuverlässigkeit.
-- Edsger Wybe Dijkstra
 
Profil || Private Message || Suche Download || Zitatantwort || Editieren || Löschen || IP
012
26.09.2003, 11:47 Uhr
virtual
Sexiest Bit alive
(Operator)



C++:
#include <iostream>
#include <fstream>
#include <string>
#include <list>
#include <iterator>

#define DICFILE "dictionary"

bool checkMatch(
     const std::string& muster,
     std::string wort)
{
     return true;
}

int main(int argc, char** argv)
{
     if(argc > 2) // Hilfe ausgeben
     {
     }

     std::cout << "Geben Sie das Musterwort ein: ";    
     std::string input;
     std::cin >> input;
     std::ifstream dic(DICFILE);
     std::list<std::string> wordlist;
     std::copy(std::istream_iterator<std::string>(dic),  
                   std::istream_iterator<std::string>(),
                   std::back_inserter(wordlist));
}


--
Gruß, virtual
Quote of the Month
Ich eß' nur was ein Gesicht hat (Creme 21)

Dieser Post wurde am 26.09.2003 um 11:49 Uhr von virtual editiert.
 
Profil || Private Message || Suche Download || Zitatantwort || Editieren || Löschen || IP
013
26.09.2003, 11:53 Uhr
Windalf
Der wo fast so viele Posts wie FloSoft...
(Operator)


@virtual
hast wohl recht ich hätte mal die aufgabenstellung lesen soll
Mein Vorteil als Windowsuser ist jedenfalls:
IST DER RUF ERST RUINIERT LEBT ES SICH GANZ UNGENIERT
was ist nun mit meiner vectorantwort?
--
...fleißig wie zwei Weißbrote
 
Profil || Private Message || Suche Download || Zitatantwort || Editieren || Löschen || IP
014
26.09.2003, 12:19 Uhr
0xdeadbeef
Gott
(Operator)



C++:
#include <iostream>
#include <fstream>
#include <string>
#include <list>
#include <iterator>

#define DICFILE "dictionary"

bool checkMatch(
     const std::string& muster,
     std::string wort)
{
     return true;
}

int main(int argc, char** argv)
{
     if(argc > 2) // Hilfe ausgeben
     {
     }

     std::cout << "Geben Sie das Musterwort ein: ";    
     std::string input;
     std::cin >> input;
     std::ifstream dic(DICFILE);
     std::list<std::string> wordlist;
     std::copy(std::istream_iterator<std::string>(dic),  
                   std::istream_iterator<std::string>(),
                   std::back_inserter(wordlist));
    for(std::list<std::string>::iterator itr = wordlist.begin(); itr != wordlist.end(); ++itr)
    {
    }
}


-- Sorry Edit statt Zitat gedrückt
--
Einfachheit ist Voraussetzung für Zuverlässigkeit.
-- Edsger Wybe Dijkstra

Dieser Post wurde am 26.09.2003 um 12:28 Uhr von virtual editiert.
 
Profil || Private Message || Suche Download || Zitatantwort || Editieren || Löschen || IP
015
26.09.2003, 12:29 Uhr
virtual
Sexiest Bit alive
(Operator)



C++:
#include <iostream>
#include <fstream>
#include <string>
#include <list>
#include <iterator>

#define DICFILE "dictionary"

bool checkMatch(
     const std::string& muster,
     std::string wort)
{
     return true;
}

int main(int argc, char** argv)
{
     if(argc > 2) // Hilfe ausgeben
     {
     }

     std::cout << "Geben Sie das Musterwort ein: ";    
     std::string input;
     std::cin >> input;
     std::ifstream dic(DICFILE);
     std::list<std::string> wordlist;
     std::copy(std::istream_iterator<std::string>(dic),  
                   std::istream_iterator<std::string>(),
                   std::back_inserter(wordlist));
    for(std::list<std::string>::iterator itr = wordlist.begin(); itr != wordlist.end(); ++itr)
    {
         if (checkMatch( *itr, input))
         {
         }
    }
}


--
Gruß, virtual
Quote of the Month
Ich eß' nur was ein Gesicht hat (Creme 21)

Dieser Post wurde am 26.09.2003 um 12:34 Uhr von virtual editiert.
 
Profil || Private Message || Suche Download || Zitatantwort || Editieren || Löschen || IP
016
26.09.2003, 12:47 Uhr
0xdeadbeef
Gott
(Operator)


Verdammt, ich hab eine brilliante Idee:

C++:
#include <iostream>
#include <fstream>
#include <string>
#include <list>
#include <iterator>

#define DICFILE "dictionary"

bool checkMatch(
     const std::string& muster,
     std::string wort)
{
     return true;
}

int main(int argc, char** argv)
{
     if(argc > 2) // Hilfe ausgeben
     {
     }

     std::cout << "Geben Sie das Musterwort ein: ";    
     std::string input;
     std::cin >> input;

     std::sort(input.begin(), input.end());

     std::ifstream dic(DICFILE);
     std::list<std::string> wordlist;
     std::copy(std::istream_iterator<std::string>(dic),  
                   std::istream_iterator<std::string>(),
                   std::back_inserter(wordlist));
    for(std::list<std::string>::iterator itr = wordlist.begin(); itr != wordlist.end(); ++itr)
    {
         if (checkMatch( *itr, input))
         {
         }
    }
}


--
Einfachheit ist Voraussetzung für Zuverlässigkeit.
-- Edsger Wybe Dijkstra
 
Profil || Private Message || Suche Download || Zitatantwort || Editieren || Löschen || IP
017
26.09.2003, 13:00 Uhr
virtual
Sexiest Bit alive
(Operator)


Tja, leider kenne ich sie bis jetzt noch nicht.

C++:
#include <iostream>
#include <fstream>
#include <string>
#include <list>
#include <iterator>

#define DICFILE "dictionary"

bool checkMatch(
     const std::string& muster,
     std::string wort)
{
     return true;
}

int main(int argc, char** argv)
{
     if(argc > 2) // Hilfe ausgeben
     {
     }

     std::cout << "Geben Sie das Musterwort ein: ";    
     std::string input;
     std::cin >> input;

     std::sort(input.begin(), input.end());

     std::ifstream dic(DICFILE);
     std::list<std::string> wordlist;
     std::copy(std::istream_iterator<std::string>(dic),  
                   std::istream_iterator<std::string>(),
                   std::back_inserter(wordlist));
    for(std::list<std::string>::iterator itr = wordlist.begin(); itr != wordlist.end(); ++itr)
    {
         if (checkMatch( *itr, input))
         {
              std::cout<<(*itr)<<std::endl;
         }
    }
}


--
Gruß, virtual
Quote of the Month
Ich eß' nur was ein Gesicht hat (Creme 21)
 
Profil || Private Message || Suche Download || Zitatantwort || Editieren || Löschen || IP
018
26.09.2003, 13:34 Uhr
0xdeadbeef
Gott
(Operator)


Fällt der Groschen? Noch eine Zeile, und wir sind fertig (wenn ich mich nicht täusche).

C++:
#include <iostream>
#include <fstream>
#include <string>
#include <list>
#include <iterator>

#define DICFILE "dictionary"

bool checkMatch(
     const std::string& muster,
     std::string wort)
{
     std::sort(wort.begin(), wort.end());
     return true;
}

int main(int argc, char** argv)
{
     if(argc > 2) // Hilfe ausgeben
     {
     }

     std::cout << "Geben Sie das Musterwort ein: ";    
     std::string input;
     std::cin >> input;

     std::sort(input.begin(), input.end());

     std::ifstream dic(DICFILE);
     std::list<std::string> wordlist;
     std::copy(std::istream_iterator<std::string>(dic),  
                   std::istream_iterator<std::string>(),
                   std::back_inserter(wordlist));
    for(std::list<std::string>::iterator itr = wordlist.begin(); itr != wordlist.end(); ++itr)
    {
         if (checkMatch( *itr, input))
         {
              std::cout<<(*itr)<<std::endl;
         }
    }
}


--
Einfachheit ist Voraussetzung für Zuverlässigkeit.
-- Edsger Wybe Dijkstra
 
Profil || Private Message || Suche Download || Zitatantwort || Editieren || Löschen || IP
019
26.09.2003, 13:36 Uhr
0xdeadbeef
Gott
(Operator)


Ach, ne. Soll ja case insensitive sein. Gut, dann dauerts noch ein paar.
--
Einfachheit ist Voraussetzung für Zuverlässigkeit.
-- Edsger Wybe Dijkstra
 
Profil || Private Message || Suche Download || Zitatantwort || Editieren || Löschen || IP
Seiten: [ 1 ] > 2 < [ 3 ]     [ Rätselecke ]  


ThWBoard 2.73 FloSoft-Edition
© by Paul Baecher & Felix Gonschorek (www.thwboard.de)

Anpassungen des Forums
© by Flo-Soft (www.flo-soft.de)

Sie sind Besucher: