Money wrote:
Is there any problem in using printf for printing the source of the
program.
Here
http://groups.google.co.in/group/com...2f7003e0d2b363
Andrew Koenig somewhat discourages to use printf to solve such problem.
Any suggestions?
Well, it's kind of a toy problem, so points of disagreement on it are
more likely to be based on aesthetic concerns than software engineering
concerns of real consequence. printf has known problems which are
sufficient to avoid it in practice; I see no reason why they are any
more or less valid in this context. It all depends on your
desirements. For toy problems, if it works, it works.
Luke