By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,986 Members | 1,905 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,986 IT Pros & Developers. It's quick & easy.

Self Printing Code

100+
P: 114
Is it possible to have a piece of code, that saves itself to a text file?
Aug 6 '07 #1
Share this Question
Share on Google+
2 Replies


10K+
P: 13,264
Is it possible to have a piece of code, that saves itself to a text file?

By "itself" you mean the source (.cpp e.t.c)? In that case if you have the source file then question is trivial. Just write code that reads the .cpp as a file and write to a new .txt. I don't suppose that's what you meant?
Aug 6 '07 #2

Expert 10K+
P: 11,448
Is it possible to have a piece of code, that saves itself to a text file?
They're called 'Quines'. Have a look at the Quines page.

kind regards,

Jos
Aug 6 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.