Click here to Skip to main content
15,922,015 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Runtime Error Pin
Paul Ranson27-Apr-04 7:22
Paul Ranson27-Apr-04 7:22 
GeneralRe: Runtime Error Pin
toxcct27-Apr-04 8:09
toxcct27-Apr-04 8:09 
GeneralRe: Runtime Error Pin
Cedric Moonen27-Apr-04 20:41
Cedric Moonen27-Apr-04 20:41 
Questionhow can i get RGB value from an image Pin
Member 41696027-Apr-04 2:55
Member 41696027-Apr-04 2:55 
AnswerRe: how can i get RGB value from an image Pin
rrrado27-Apr-04 3:11
rrrado27-Apr-04 3:11 
GeneralRe: how can i get RGB value from an image Pin
Alexander M.,27-Apr-04 5:31
Alexander M.,27-Apr-04 5:31 
GeneralRe: how can i get RGB value from an image Pin
Member 41696027-Apr-04 20:36
Member 41696027-Apr-04 20:36 
GeneralI/O Read Write to the same file Pin
Zombie_Inc27-Apr-04 2:55
Zombie_Inc27-Apr-04 2:55 
Hi,

I have a question regarding reading and writing to the same (text)file. I know it is not Visual C++ (just C++) but I still hope someone will respond.

I have a project which I run from the command promp. The same exe file is run twice, with different parameters sent to the main() function, so that I have two dos windows open at the same time.
Below P1 is the first program and P2 the second program.

P1 output file is P2 inputfile and vice versa.

P1 reads a line with cin and then output it to a file. P2 does the same.

Everything works fine so far but...

...the question is how I would code a loop so that P1 reads a line from P2 output file with i.e. getline() until the textfile is updated(changed) by P2 and ONLY then print it out on P1 screen and vice versa???

This might seem to be a stupid program but it is for studying purpose.

Thanks in advance for any hints or solutions
Regards
Lars
GeneralRe: I/O Read Write to the same file Pin
rrrado27-Apr-04 3:26
rrrado27-Apr-04 3:26 
GeneralRe: I/O Read Write to the same file Pin
rrrado27-Apr-04 3:28
rrrado27-Apr-04 3:28 
GeneralRe: I/O Read Write to the same file Pin
David Crow27-Apr-04 3:31
David Crow27-Apr-04 3:31 
GeneralRe: I/O Read Write to the same file Pin
Zombie_Inc27-Apr-04 10:53
Zombie_Inc27-Apr-04 10:53 
GeneraldiskFull (but not really !) problem Pin
Still learning how to code27-Apr-04 1:58
Still learning how to code27-Apr-04 1:58 
GeneralRe: diskFull (but not really !) problem Pin
jmkhael27-Apr-04 2:43
jmkhael27-Apr-04 2:43 
GeneralRe: diskFull (but not really !) problem Pin
toxcct27-Apr-04 2:47
toxcct27-Apr-04 2:47 
GeneralRe: diskFull (but not really !) problem Pin
jmkhael27-Apr-04 2:49
jmkhael27-Apr-04 2:49 
GeneralRe: diskFull (but not really !) problem Pin
toxcct27-Apr-04 2:51
toxcct27-Apr-04 2:51 
GeneralRe: diskFull (but not really !) problem Pin
jmkhael27-Apr-04 2:52
jmkhael27-Apr-04 2:52 
GeneralRe: diskFull (but not really !) problem Pin
Still learning how to code27-Apr-04 6:52
Still learning how to code27-Apr-04 6:52 
GeneralCharacters and strings Pin
A Jones27-Apr-04 1:30
A Jones27-Apr-04 1:30 
GeneralRe: Characters and strings Pin
Anonymous27-Apr-04 1:41
Anonymous27-Apr-04 1:41 
GeneralRe: Characters and strings Pin
toxcct27-Apr-04 1:57
toxcct27-Apr-04 1:57 
GeneralRe: Characters and strings Pin
David Crow27-Apr-04 2:11
David Crow27-Apr-04 2:11 
GeneralRe: Characters and strings Pin
Garth J Lancaster27-Apr-04 2:25
professionalGarth J Lancaster27-Apr-04 2:25 
GeneralRe: Characters and strings Pin
David Crow27-Apr-04 2:34
David Crow27-Apr-04 2:34 

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.