I want my program to take input from a file rather than from keyboard and also output it to a file not screen. I tried writing prgram. This is what I wrote in visual studio...
- using namespace std;
- void main()
- freopen("Document.in" ,"r",stdin);
- int x;
But when I run the program nothing happens. I also tried to only take input from file and output it to screen. Then also it gave garbage value.