Hey all. I have written a quine and I was wondering if I have the jist of it right. I'm not sure if the code needs to be longer or this would be a suitable answer. Here is what I have. btw driver.cpp is the file name for my source code for this program.

#include <iostream>
#include <fstream>
#include <string>

using namespace std;

int main()
	string temp;
	cout << "this is a simple quine program";
	cout << "\nthe sourece code for this program is a follow:\n";
	ifstream fin("driver.cpp");
	while (getline(fin, temp))
		cout << temp << "\n";
	return 0;

Edited 6 Years Ago by NathanOliver: n/a

Sorry but that is not a quine program (see this link).

A quine takes no input. Allowing input would permit the source code to be fed to the program via the keyboard, opening the source file of the program, and similar mechanisms.

This question has already been answered. Start a new discussion instead.