Using outfile to write name PLEASE HELP

I am trying to display my name using outfile vs. cout and I get errors I don't know how to fix. Here is the code:

// Johnakin Martin
//This program will calculate the monthly payment, the total amount paid back over the entire life of the loan,
// and the total interest paid over the life of the loan.

#include <iostream>
#include <fstream>
#include <iomanip>
using namespace std;

int main()
{
ofstream outfile;
outfile.open<<("monthly payment");
ifstream infile;
infile.open("input.dat");
outfile<<"*******************************************************************"<<endl<<endl;
outfile<<"*******************************************************************"<<endl<<endl;
outfile<< setw(10) <<"M" << setw(10) << "M" << setw(15) << "A" << setw(15) <<"RRRRRRRRRRRR" << setw(15)<< "TTTTTTTTTTTT"<<endl;


outfile<<"*******************************************************************"<<endl<<endl;
outfile<<"*******************************************************************"<<endl<<endl;


outfile.close();
infile.close();
return 0;
}

And here are my errors:

1>z:\csci207\program1practice.cpp(13): error C2297: '<<' : illegal, right operand has type 'const char [16]'
1>z:\csci207\program1practice.cpp(13): warning C4552: '<<' : operator has no effect; expected operator with side-effect

Help would be appreciated!
closed account (28poGNh0)
Try to alter this statement outfile.open<<("monthly payment"); to outfile.open("monthly payment");
Topic archived. No new replies allowed.