Can I get my output in my program to be sent to another program like Wordpad or Microsoft word?
annagraphicart 0 Light Poster
Recommended Answers
Jump to PostYes, but its more complex than you can handle right now. Just concentrate on writing the output to a simple text file.
Jump to Post>>which i hear is impossible
No its not -- there are lots of programs that do it. Why not just write it to a file then use word if you want to print it ?
Jump to PostWhat do you mean "write it to a file"?
Like use fstream object and output the text to a file. Not all that difficult. If you don't know how to do that then I don't think you can complete the project on time.
Jump to PostJust open a stream to "LPT1:" and send the data to it. Try this program and see if it comes out on your printer.
#include <fstream> using namespace std; int main() { fstream out("LPT1:"); if( out.is_open()) { out << "Hello World\n"; } return 0; }
[edit]The program …
All 13 Replies
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
annagraphicart 0 Light Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
annagraphicart 0 Light Poster

iamthwee
annagraphicart 0 Light Poster

iamthwee
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
annagraphicart 0 Light Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
annagraphicart 0 Light Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
annagraphicart 0 Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.