News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

file input to C programs

Started by moey, April 22, 2011, 08:42:38 AM

Previous topic - Next topic

moey

Hey guys,
So, i was wondering if there was a way to make your program read a file as standard input.
In linux the command was ./run < input.txt, with ./run being the program and input.txt being the file which includes the data.
thanks

oBFusCATed

Search the forum, it is answered million times, when you found an answer, please enrich our FAQ in the wiki -> http://wiki.codeblocks.org/index.php?title=FAQ
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]