View Full Version : [SOLVED] printf into a file
July 29th, 2011, 08:30 PM
Is there a way to make printf print into a file instead of stdout? I've never worked with files before in c/c++, just robots.... A simple helloworld code would be appreciated.
July 29th, 2011, 08:36 PM
FILE *fp; /*then open the file*/
fprintf(fp, "Hello, %s!", name)
July 29th, 2011, 09:04 PM
Thank you for the quick reply!
July 30th, 2011, 09:03 AM
I gather we can assume you are programming in C?
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.