| | |
making labels with c++
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jan 2006
Posts: 32
Reputation:
Solved Threads: 0
I have the logic all figured out for a nes program that will spit out labels with unique charactrs on it...Almost like barcodes, but nothing that fancy. My stickers will have something like this: ABCGIU101.DFF
Like I said, I have the logic but I am not sure how to start the project with C++ since I dont want to out put to word and print from there. I want my program to be self sustaining. Any suggestions on how to print out a series of these labels using c++. Can I output to a text file and print from there ? That would be OK for me.
Wow, pretty soon i might actually become a programmer with all this little projects.
MuthuIVS
Like I said, I have the logic but I am not sure how to start the project with C++ since I dont want to out put to word and print from there. I want my program to be self sustaining. Any suggestions on how to print out a series of these labels using c++. Can I output to a text file and print from there ? That would be OK for me.
Wow, pretty soon i might actually become a programmer with all this little projects.
MuthuIVS
So you need to generate a unique label?
dwk
Seek and ye shall find.
"Only those who will risk going too far can possibly find out how far one can go."
-- TS Eliot.
"I have not failed. I've just found 10,000 ways that won't work."
-- Thomas Alva Edison
"The only real mistake is the one from which we learn nothing."
-- John Powell
Seek and ye shall find.
"Only those who will risk going too far can possibly find out how far one can go."
-- TS Eliot.
"I have not failed. I've just found 10,000 ways that won't work."
-- Thomas Alva Edison
"The only real mistake is the one from which we learn nothing."
-- John Powell
•
•
Join Date: Jan 2006
Posts: 32
Reputation:
Solved Threads: 0
Yes, I know how to generate the unique numbers, just not sure where to spit out the results so that they can be printed out using AVERY-5167 labels. Would I be able to output to a text file perhaps? and if i did would the formatting for a txt file be the same pc to pc ?
•
•
•
•
Originally Posted by dwks
So you need to generate a unique label?
Take a look at the C++ code snippet at
http://www.daniweb.com/code/snippet122.html
You will have to format your text to fit the labels.
http://www.daniweb.com/code/snippet122.html
You will have to format your text to fit the labels.
May 'the Google' be with you!
•
•
Join Date: Jan 2006
Posts: 32
Reputation:
Solved Threads: 0
•
•
•
•
Originally Posted by vegaseat
Take a look at the C++ code snippet at
http://www.daniweb.com/code/snippet122.html
You will have to format your text to fit the labels.
•
•
•
•
It there a way to just print out to the usb printer
C++ Syntax (Toggle Plain Text)
C:\>program Hello, World! C:\>program >file.txt C:\>type file.txt Hello, World! C:\>
Or you might be able to do this:
C++ Syntax (Toggle Plain Text)
C:\>program >prn
C++ Syntax (Toggle Plain Text)
fprintf(stdprn, "Hello, World!\n");
dwk
Seek and ye shall find.
"Only those who will risk going too far can possibly find out how far one can go."
-- TS Eliot.
"I have not failed. I've just found 10,000 ways that won't work."
-- Thomas Alva Edison
"The only real mistake is the one from which we learn nothing."
-- John Powell
Seek and ye shall find.
"Only those who will risk going too far can possibly find out how far one can go."
-- TS Eliot.
"I have not failed. I've just found 10,000 ways that won't work."
-- Thomas Alva Edison
"The only real mistake is the one from which we learn nothing."
-- John Powell
•
•
Join Date: Jan 2006
Posts: 32
Reputation:
Solved Threads: 0
The only problem about rpinting from a txt file is that I cannot get the labels to line up. I have already tried this, but the endl (endline) characheter is too wide, and txt files do not allow me change that setting. Also the fonts have to be in Even numbers withour decimals, that is also making it hard for me to get it to fit perfectly into a 80 label sheet (20*4).
MuthuIVS
MuthuIVS
•
•
•
•
the endl (endline) characheter is too wide
•
•
•
•
Also the fonts have to be in Even numbers withour decimals, that is also making it hard for me to get it to fit perfectly into a 80 label sheet (20*4).
dwk
Seek and ye shall find.
"Only those who will risk going too far can possibly find out how far one can go."
-- TS Eliot.
"I have not failed. I've just found 10,000 ways that won't work."
-- Thomas Alva Edison
"The only real mistake is the one from which we learn nothing."
-- John Powell
Seek and ye shall find.
"Only those who will risk going too far can possibly find out how far one can go."
-- TS Eliot.
"I have not failed. I've just found 10,000 ways that won't work."
-- Thomas Alva Edison
"The only real mistake is the one from which we learn nothing."
-- John Powell
•
•
Join Date: Jan 2006
Posts: 32
Reputation:
Solved Threads: 0
I think I am doing everything right because I am making sure I am not stuffing toomany info on 1 line and so on. I am now trying to print the output to a RTF template that will defintely work but once my program writes to it , the formatting in the RTF is all deleted. Any Idea how to get around that?
Open the file in append mode instead of truncuate?
dwk
Seek and ye shall find.
"Only those who will risk going too far can possibly find out how far one can go."
-- TS Eliot.
"I have not failed. I've just found 10,000 ways that won't work."
-- Thomas Alva Edison
"The only real mistake is the one from which we learn nothing."
-- John Powell
Seek and ye shall find.
"Only those who will risk going too far can possibly find out how far one can go."
-- TS Eliot.
"I have not failed. I've just found 10,000 ways that won't work."
-- Thomas Alva Edison
"The only real mistake is the one from which we learn nothing."
-- John Powell
![]() |
Similar Threads
Other Threads in the C++ Forum
- Previous Thread: Number of times a number appears in an array
- Next Thread: Trying to use c++ to print to a usb printer
| Thread Tools | Search this Thread |
Tag cloud for C++
6 api array arrays based beginner binary bmp c++ c/c++ calculator char class classes code compile compiler console conversion convert count data delete deploy desktop directshow dll download dynamic encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp iamthwee ifstream input int java lib library linkedlist linker list loop looping loops map math matrix memory microsoft newbie news number output pointer problem program programming project python random read recursion recursive reference simple string strings studio system temperature template templates test text text-file tree unix url variable vector video visual visualstudio void win32 windows winsock wordfrequency wxwidgets






