Mar 1, 2012 at 12:36pm UTC
Im getting Initilizer Expression list treated as compound expression
Whats gone wrong?
#include <windows.h>
#include <fstream>
#include <iostream>
#include <string>
using namespace std;
int main ()
{
std::string input1;
std::string& replace(" ", "-",input1);
std::string input2;
std::string input3;
std::string input4;
ofstream myfile;
cout << "Please Enter Name..." << endl << endl;
cout << "Name: ";
cin >> input1;
cout << "" << endl << endl << endl;
cout << "Please Enter Password..." << endl << endl;
cout << "Pass: ";
cin >> input3;
cout << "" << endl << endl << endl;
myfile.open ("user Info.txt");
myfile << input1 << "\n";
myfile << input3;
myfile.close();
system("pause");
return(0);
}
Thanks In Advance
Mar 1, 2012 at 12:57pm UTC
and please put you code between [code] tags [ /code]
Mar 1, 2012 at 4:22pm UTC
Please, use a compiler other than the out-of-date MinGW compiler that ships with Dev-C++.
PS. I noticed you're from Stoke too :) I never thought I'd see the day.
Wazzak