How's it going:
How do you use fopen() to establish a stream to console I/O (keyboard)? What I needed to do is read in data from the console I/O and then send it elsewhere using fputs. I just don't know what the first argument for fopen("here", r) would be. Oh, and this is an event driven program (chatting); and the fopen will be part of a read event handler. I am supposed to read data from the console using fgets and then send it out to the other recipient using fputs. Thanks.
All 2 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.