i am trying to write input() function into file.....
please help....
i am using visual studio 2013
// N Copy.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "iostream"
#include "fstream"
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
fstream file;
file.open("NCopy.txt");
file << input();
file.close();
system("pause");
return 0;
}
void input()
{
cout << "Enter how many copies you want: ";
int num;
cin >> num;
cout << "Enter text you want to copy: " << endl;
char in[256];
cin.getline(in, 256);
for (int n = 1; n <= num; n++)
{
cout << n << ": " << in << endl;
}
}