hello people
i'm am a litle bit new to programming in c++ i did some assembly in microcontrollers and now i'm trying to learn c++ i'm doing this for about a week.
i'm making a program that uses a basic text file as a database.
i'm loading the whole file into the memory(not clever i know.), in an array called data ,
then i'm trying to search a string inside the array, this is the code.
srr for my bad english i'm dutch so. if i compile this code everthing is just fine. but when i'm running the code it gets stuck write after zoek:
can someone please tell me what the problem is??.this is not the whole file (it's to large :p)
thnks in advance
int testzoek()
{
cout <<"type : land jaartal waarde en optie letter"<< endl;
cout <<" voorbeeld: duitsland 2008 20c f" << endl;
cin >> my ;
zoek: <<---------------------->> after this
while(data[regel].find(my)== data[regel].npos);
{
cout << "munt is niet gevonden in regel nr:" << regel<< endl;
regel++;
}
aha i did read something about the npos haha i'm so stupid:P
i'm going to try it wright away
yes it's a array of std::strings
you don't wanna know what string in dutch means haha
anyway,
you are great ;) thnks