I'm trying to save useless printf() functions, and echo the data that's in my input file (.txt) whenever I start the program, I'm trying to do it with a system() function that uses command redirections. https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/redirection.mspx?mfr=true
The data that I'm trying to echo is the intro and a set of rules:
A secret password was chosen to protect the credit card of Pancratius, the descendant of Antiochus. Your mission is to stop Pancratius by revealing his secret password.
The rules are as follows:
1. In each round you try to guess the secret password (4 distinct digits)
2. After every guess you'll receive two hints about the password HITS: The number of digits in your guess which were exactly right.
MISSES: The number of digits in your guess which belongs to the password but were miss-placed.
Is it possible to do so? if so, which redirect command should I use? can it be something like
system("program.exe < input.txt")
I really want to avoid using a single printf() and the whole text in it and using "\n" etc. or using lots of printf() functions (as stated above) for each sentence etc.