Click here to Skip to main content
15,905,028 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
GeneralRe: Cost Calculation Problem Pin
toxcct12-Apr-06 22:58
toxcct12-Apr-06 22:58 
GeneralRe: Cost Calculation Problem Pin
Hamid_RT13-Apr-06 0:45
Hamid_RT13-Apr-06 0:45 
AnswerRe: Cost Calculation Problem Pin
_AnsHUMAN_ 12-Apr-06 23:44
_AnsHUMAN_ 12-Apr-06 23:44 
Questionadjust the step size of the ProgressBar Pin
kiran janaswamy12-Apr-06 20:30
kiran janaswamy12-Apr-06 20:30 

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.