Write a program that, when run, will print out its source code. This source code, inWrite a program that, when run, will print out its source code. This source code, in turn, should compile and print out itself. turn, should compile and print out itself. :p

Write a program that, when run, will print out its source code. This source code, inWrite a program that, when run, will print out its source code. This source code, in turn, should compile and print out itself. turn, should compile and print out itself. :p

Sounds like a virus to me... You won't find anyone to help you out with that here.

Sounds like a virus to me... You won't find anyone to help you out with that here.

It's called a quine. They're completely harmless diversions.

It's called a quine. They're completely harmless diversions.

If I understand the OP's intentions correctly, its not just a quine - the description looks to me as if it would be an infinite recursive loop, that would increasingly swallow more and more memory & HD space :

This source code, in turn, should compile and print out itself. turn, should compile and print out itself.

If I understand the OP's intentions correctly, its not just a quine - the description looks to me as if it would be an infinite recursive loop, that would increasingly swallow more and more memory & HD space :

I think that was more of an awful copy and paste job than a part of the problem description. ;)

I think that was more of an awful copy and paste job than a part of the problem description. ;)

Heh, quite possibly ;) its hard to tell with some people :)

This article has been dead for over six months. Start a new discussion instead.