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

C / C++ / MFC

 
AnswerRe: On Dialog Box Pin
Rajkumar R25-Mar-08 19:45
Rajkumar R25-Mar-08 19:45 
GeneralRe: On Dialog Box Pin
Chandrasekharan P25-Mar-08 20:25
Chandrasekharan P25-Mar-08 20:25 
GeneralRe: On Dialog Box [modified] Pin
Rajkumar R25-Mar-08 21:22
Rajkumar R25-Mar-08 21:22 
GeneralRe: On Dialog Box Pin
rp_suman25-Mar-08 19:55
rp_suman25-Mar-08 19:55 
GeneralRe: On Dialog Box Pin
Chandrasekharan P25-Mar-08 20:07
Chandrasekharan P25-Mar-08 20:07 
GeneralRedirection in command line "<" Pin
uusheikh25-Mar-08 17:30
uusheikh25-Mar-08 17:30 
GeneralRe: Redirection in command line "<" Pin
User 58385225-Mar-08 17:59
User 58385225-Mar-08 17:59 
GeneralRe: Redirection in command line "<" Pin
fefe.wyx25-Mar-08 18:21
fefe.wyx25-Mar-08 18:21 
Note that stdin and stdout are also file handles. When no redirection occurs, stdin is the keyboard and stdout is the monitor.

In the form of program1.exe > out.txt, stdout is assigned with a file handle to the file out.txt, instead of the monitor. So all the output goes into out.txt instead of the monitor.

In the form of program1.exe < in.txt, stdin is assigned with a file handle to the file in.txt, instead of the keyboard. So whenever you read from stdin, e.g. when you call the scanf() function, the data come form in.txt, not the keyboard.

Redirecting is handled by the OS, not by the program, so the program itself will know nothing about the redirection, and redirection directives would be passed to program as parameters. Thus argc in main is 1, not 3.
GeneralRe: Redirection in command line "&lt;" Pin
uusheikh25-Mar-08 20:18
uusheikh25-Mar-08 20:18 
GeneralRe: Redirection in command line "&lt;" Pin
Maxwell Chen25-Mar-08 21:03
Maxwell Chen25-Mar-08 21:03 
GeneralRe: Redirection in command line "&lt;" Pin
uusheikh25-Mar-08 21:25
uusheikh25-Mar-08 21:25 
GeneralRe: Redirection in command line "&lt;" Pin
Maxwell Chen25-Mar-08 21:18
Maxwell Chen25-Mar-08 21:18 
GeneralRe: Redirection in command line "&lt;" Pin
David Crow26-Mar-08 4:10
David Crow26-Mar-08 4:10 
QuestionHow to insert a child form? Pin
TooShy2Talk25-Mar-08 16:48
TooShy2Talk25-Mar-08 16:48 
QuestionUsing CFileDialog? Pin
dipuks25-Mar-08 15:59
dipuks25-Mar-08 15:59 
AnswerRe: Using CFileDialog? Pin
David Crow25-Mar-08 16:11
David Crow25-Mar-08 16:11 
GeneralCompare and merge Pin
KirkNarine25-Mar-08 9:15
KirkNarine25-Mar-08 9:15 
GeneralRe: Compare and merge Pin
led mike25-Mar-08 10:14
led mike25-Mar-08 10:14 
AnswerRe: Compare and merge Pin
Maxwell Chen25-Mar-08 17:50
Maxwell Chen25-Mar-08 17:50 
QuestionMethod to get file path Pin
nvphap25-Mar-08 8:55
nvphap25-Mar-08 8:55 
GeneralRe: Method to get file path Pin
David Crow25-Mar-08 10:05
David Crow25-Mar-08 10:05 
GeneralRe: Method to get file path Pin
led mike25-Mar-08 10:12
led mike25-Mar-08 10:12 
GeneralRe: Method to get file path Pin
nvphap25-Mar-08 16:55
nvphap25-Mar-08 16:55 
GeneralRe: Method to get file path Pin
Mark Salsbery25-Mar-08 17:07
Mark Salsbery25-Mar-08 17:07 
GeneralRe: Method to get file path Pin
nvphap25-Mar-08 21:35
nvphap25-Mar-08 21:35 

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.