Same as linux. executable.exe < file.in > file.out
In visual studio you can put the last part in the program arguments in the debug section. The " < file.in > file.out" without the quotes. In c++, you can use the function "freopen" to explicitly redirect. Carlos Guia On Apr 28, 2012 4:41 PM, "Sudhir Yadav" <[email protected]> wrote: > How to redirect input and output from/to file in windows? > I am using visual studio to compile and run my programs. > > > > > > > > > > Sudhir Yadav > > > > On Mon, Apr 16, 2012 at 1:09 AM, Luke Pebody <[email protected]>wrote: > >> This is also possible in windows and mac os. >> >> On Sun, Apr 15, 2012 at 6:38 PM, Rajnesh Raturi >> <[email protected]> wrote: >> > If you are using linux you can redirect your input file to your >> executable. >> > >> > as example. >> > ./a.out < inputfile > outputfile >> > >> > here a.out is the executable file, inputfile is your given input file >> and >> > outputfile is the file where your result will be written. >> > >> > Thanks >> > Raj. >> > >> > >> > On Thu, Apr 12, 2012 at 7:21 PM, K21G <[email protected]> wrote: >> >> >> >> anybody please help me in file input in c++.....i had tried a lot of >> >> code but still unable to input correctly... >> >> >> >> -- >> >> You received this message because you are subscribed to the Google >> Groups >> >> "Google Code Jam" group. >> >> To post to this group, send email to [email protected]. >> >> To unsubscribe from this group, send email to >> >> [email protected]. >> >> For more options, visit this group at >> >> http://groups.google.com/group/google-code?hl=en. >> >> >> > >> > >> > >> > -- >> > rajnesh raturi >> > >> > -- >> > You received this message because you are subscribed to the Google >> Groups >> > "Google Code Jam" group. >> > To post to this group, send email to [email protected]. >> > To unsubscribe from this group, send email to >> > [email protected]. >> > For more options, visit this group at >> > http://groups.google.com/group/google-code?hl=en. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Google Code Jam" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/google-code?hl=en. >> >> > -- > You received this message because you are subscribed to the Google Groups > "Google Code Jam" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/google-code?hl=en. > -- You received this message because you are subscribed to the Google Groups "Google Code Jam" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-code?hl=en.
