print on paper

Mar 30, 2015 at 6:58pm
hi,
like to print on physical paper. i use xcode.
thanks a lot for any idea,
cheers m

ps: guess i have to use ofstream in some way?
Mar 30, 2015 at 7:07pm
uhm... what exactly do you mean?
Mar 30, 2015 at 7:15pm
you can use the CUPS daemon if you don't want to do much work.

http://www.cups.org/
Mar 30, 2015 at 7:15pm
i coded a simple program to store data and would like to add a "print out" option. my idea is to load stored data into a array (from a txt file) and subsequently print the content on paper. however, i have no idea how to address a printer (connected via USB) and could not find a tutorial so far...
thx m
Mar 31, 2015 at 5:00pm
This is an OS dependent question, however if you are as new to c++ as you seem, my best recommendation is to finish a book on programming, C++ programming by Malik is what I reccomend, as it teaches you a little C-style followed by a whole lot of information on programming in console.
However if my guess is wrong and your a little more used to programming than you seem then, https://msdn.microsoft.com/en-us/library/windows/desktop/ff819270%28v=vs.85%29.aspx is how you would do so on windows.
Apr 2, 2015 at 6:42pm
i am a newbee - thx for the help so far. i take the advice and screen some literature...
m
Apr 3, 2015 at 12:46am
If your as new as you are, I'd recommend not trying to print to paper, as you can run into driver issues, buffer issues, and sorts of other issues. What your trying to do, is something that you shouldn't need to do in any job assignment, unless you get some really REALLY bad freelance contract, and if you do, you better be getting paid top dollar for it.
Topic archived. No new replies allowed.