Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File manipulation

Status
Not open for further replies.

Leibnitz

Programmer
Apr 6, 2001
393
CA
I am trying to create an application that searchs in a specific file for a string(Lets call it string1) when that string is found,it(the application)suppose to display another string(string2)which i have chosen to match string1.
I know how to search for string1 in a file but when i found it,i dont know how to display the string that match's string1(string2).
I hope that you people catch my idea,if not,tell me i'll try to reformulate.

So,any help will be very apreciated.
 
in case of successfull search, what's the difference
between string1 and string2 ?
 
String2 has to be another string,it has to be different from String1.But whenever a user enter String1 as input,i want to display String2 at that moment.String1 and String2 are both has to be loaded from a file.
 
Erzaehl mal noch ausfuehrlicher, was du eigentlich willst...
:)
 
Dont I denken, daß die meisten Leute hier verstehen Deutschen
 
Now, I may just be a novice, but it sounds like you'd use the ifstream command (let's call it fin) and retrieve both lines, then display the second one, yes?

You said you got it to find the file, right? Because if you haven't, then say so and I have the code. Note: If you're not using a simple Console Application, disregard that advice, because that's all I know.
 
Thanks for the advice SpeakerForTheDead !
For Zyrenthian and mingis,sorry i dont speak a word of German !
:)
 
By the way,SpeakerForTheDead if you have some code,i would like to see it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top