Click here to Skip to main content
14,661,292 members
Home » Discussions » C / C++ / MFC

C / C++ / MFC

GeneralRe: SMS Access Pin
Bram van Kampen3-Dec-18 14:52
MemberBram van Kampen3-Dec-18 14:52 
GeneralRe: SMS Access Pin
leon de boer3-Dec-18 15:46
Memberleon de boer3-Dec-18 15:46 
GeneralRe: SMS Access Pin
Richard MacCutchan3-Dec-18 21:49
mveRichard MacCutchan3-Dec-18 21:49 
QuestionUsing a selection Pin
_Flaviu2-Dec-18 2:56
Member_Flaviu2-Dec-18 2:56 
AnswerRe: Using a selection Pin
Victor Nijegorodov2-Dec-18 9:12
MemberVictor Nijegorodov2-Dec-18 9:12 
GeneralRe: Using a selection Pin
_Flaviu2-Dec-18 23:24
Member_Flaviu2-Dec-18 23:24 
QuestionTesting a CGI Pin
Bram van Kampen1-Dec-18 14:26
MemberBram van Kampen1-Dec-18 14:26 
QuestionString In C++ Pin
Hack Baba1-Dec-18 3:30
MemberHack Baba1-Dec-18 3:30 
Plz Help Me, I am trying to make a school project which is a search engine that takes input from the user and searches the entered word or sentence within the files available. There's no compile error in the program but the program is not searching correctly the file which has the data. If the entered string matches any sentence or string in the file stored then it should display the result.
But the problem is that the strcmp or stricmp or any function which searches for a match is not working.
I am using it with if & else statement for now... If the string is in the file then it should show found else not found but it only works if there is only one word in the file. If the file which is to be searched has lots of data off course in the text format it always shows not found but if it has only one word then it says found. Plz help Me If You Can.
void search()

char str2[100];

char str[100];

cout<<"write some text to search:";


ifstream i;"stud.txt");



	 cout<<"found !";


	 cout<<"not found !";



modified 1-Dec-18 11:37am.

QuestionRe: String In C++ Pin
CPallini1-Dec-18 4:49
mveCPallini1-Dec-18 4:49 
AnswerRe: String In C++ Pin
Joe Woodbury1-Dec-18 7:03
professionalJoe Woodbury1-Dec-18 7:03 
GeneralRe: String In C++ Pin
Hack Baba2-Dec-18 21:54
MemberHack Baba2-Dec-18 21:54 
GeneralRe: String In C++ Pin
jeron13-Dec-18 5:44
Memberjeron13-Dec-18 5:44 
GeneralRe: String In C++ Pin
Hack Baba4-Dec-18 5:57
MemberHack Baba4-Dec-18 5:57 
GeneralRe: String In C++ Pin
Hack Baba4-Dec-18 6:02
MemberHack Baba4-Dec-18 6:02 
Questionstring array ? Pin
Vaclav_29-Nov-18 5:34
MemberVaclav_29-Nov-18 5:34 
AnswerRe: string array ? Pin
Daniel Pfeffer29-Nov-18 5:59
professionalDaniel Pfeffer29-Nov-18 5:59 
GeneralRe: string array ? Pin
Vaclav_29-Nov-18 6:14
MemberVaclav_29-Nov-18 6:14 
GeneralRe: string array ? Pin
leon de boer29-Nov-18 14:59
Memberleon de boer29-Nov-18 14:59 
Questionabout deep learn Pin
Member 1406444226-Nov-18 19:08
MemberMember 1406444226-Nov-18 19:08 
AnswerRe: about deep learn Pin
CPallini26-Nov-18 20:57
mveCPallini26-Nov-18 20:57 
GeneralRe: about deep learn Pin
David Crow27-Nov-18 3:42
MemberDavid Crow27-Nov-18 3:42 
GeneralRe: about deep learn Pin
CPallini27-Nov-18 11:47
mveCPallini27-Nov-18 11:47 
QuestionDisplay tooltip for each listbox item on combobox using ctooltipctrl Pin
Member 1031536521-Nov-18 6:29
professionalMember 1031536521-Nov-18 6:29 
AnswerRe: Display tooltip for each listbox item on combobox using ctooltipctrl Pin
Victor Nijegorodov21-Nov-18 23:49
MemberVictor Nijegorodov21-Nov-18 23:49 
GeneralRe: Display tooltip for each listbox item on combobox using ctooltipctrl Pin
Member 1031536525-Nov-18 21:37
professionalMember 1031536525-Nov-18 21:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.