Click here to Skip to main content
15,921,606 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Login Form Pin
Cedric Moonen12-Apr-06 21:36
Cedric Moonen12-Apr-06 21:36 
GeneralRe: Login Form Pin
Aqueel12-Apr-06 21:45
Aqueel12-Apr-06 21:45 
GeneralRe: Login Form Pin
Nokoff13-Apr-06 3:10
Nokoff13-Apr-06 3:10 
GeneralRe: Login Form Pin
Nokoff13-Apr-06 3:11
Nokoff13-Apr-06 3:11 
GeneralRe: Login Form Pin
Cedric Moonen13-Apr-06 3:20
Cedric Moonen13-Apr-06 3:20 
GeneralRe: Login Form Pin
Nokoff13-Apr-06 7:00
Nokoff13-Apr-06 7:00 
QuestionFunctions and dlls Pin
Nokoff12-Apr-06 21:00
Nokoff12-Apr-06 21:00 
AnswerRe: Functions and dlls Pin
Cedric Moonen12-Apr-06 21:45
Cedric Moonen12-Apr-06 21:45 
GeneralRe: Functions and dlls Pin
Nokoff13-Apr-06 3:13
Nokoff13-Apr-06 3:13 
GeneralRe: Functions and dlls Pin
Cedric Moonen13-Apr-06 3:23
Cedric Moonen13-Apr-06 3:23 
GeneralRe: Functions and dlls Pin
Nokoff13-Apr-06 9:01
Nokoff13-Apr-06 9:01 
QuestionStreamReader() Search and destroy lol Pin
Nokoff12-Apr-06 20:53
Nokoff12-Apr-06 20:53 
Hi there, I need some help pertaining to a text file I'm using. No use explaining now, I'll do it as I go along.

Here is an example of my text file:


Sasko Sam Seedloaf 800gr [6.86] #3##<br />
Elite Gouda Cheese 500gr [32.90] #5##<br />
Wholegrain [5.00] #6##<br />
Wholewheat [6.00] #7##<br />
Coke [7.00] #0##


If i break it down, using the first line as an example, each line contains:

A product: "Sasko Sam Seedloaf 800gr"
A price: "6.86"
A quantity "3".

I am using a groupbox, with all the product names loaded into it so I have the string to search for. I want to modify the quantity value.

So for example, I need to be able to search through the text file, to find "Wholegrain", which in this case is on the 3rd line. And change the quantity value from '6' to '4'. Any ideas on how to do this?

I have so far,

StreamReader^ din = File::OpenText(file_path); // Where file path is of course the location of the text file<br />
<br />
String^ all_text = din->ReadToEnd(); // Reads all text into the all_text string variable<br />
<br />
int place_holder = all_text->IndexOf(products_in_stock->Text) // the position of the 'products_in_stock' variable


Any help would be much appreciated
Thank you Wink | ;)
Nokoff
AnswerRe: StreamReader() Search and destroy lol Pin
toxcct12-Apr-06 23:36
toxcct12-Apr-06 23:36 
GeneralRe: StreamReader() Search and destroy lol Pin
Nokoff13-Apr-06 3:14
Nokoff13-Apr-06 3:14 
GeneralRe: StreamReader() Search and destroy lol Pin
toxcct13-Apr-06 3:38
toxcct13-Apr-06 3:38 
GeneralRe: StreamReader() Search and destroy lol Pin
Nokoff13-Apr-06 7:03
Nokoff13-Apr-06 7:03 
GeneralRe: StreamReader() Search and destroy lol Pin
toxcct13-Apr-06 7:06
toxcct13-Apr-06 7:06 
QuestionCost Calculation Problem Pin
Harsimran_Singh12-Apr-06 20:42
Harsimran_Singh12-Apr-06 20:42 
AnswerRe: Cost Calculation Problem Pin
thatsme_cool12-Apr-06 21:05
thatsme_cool12-Apr-06 21:05 
GeneralRe: Cost Calculation Problem Pin
Harsimran_Singh12-Apr-06 21:14
Harsimran_Singh12-Apr-06 21:14 
GeneralRe: Cost Calculation Problem Pin
toxcct12-Apr-06 22:28
toxcct12-Apr-06 22:28 
GeneralRe: Cost Calculation Problem Pin
Harsimran_Singh12-Apr-06 22:36
Harsimran_Singh12-Apr-06 22:36 
GeneralRe: Cost Calculation Problem Pin
Cedric Moonen12-Apr-06 22:40
Cedric Moonen12-Apr-06 22:40 
GeneralRe: Cost Calculation Problem Pin
toxcct12-Apr-06 22:42
toxcct12-Apr-06 22:42 
GeneralRe: Cost Calculation Problem Pin
Harsimran_Singh12-Apr-06 22:54
Harsimran_Singh12-Apr-06 22:54 

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.