I don't know why this is happening!
Please bear with me if I don't get something as I am only 13.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main()
{
string filename;
string longname;
string gametype;
cout << "\nWelcome to the Republic Commando Map Updater and Load Updater\n";
cout << "\nPlease Enter the filename of the map without the file extension\n";
cin >> filename;
cout << "\n\nPlease Enter the full name of the map\n";
cin >> longname;
cout << "\n\nPlease enter type of game - DM = DeathMatch - TM = Team DeathMatch - \nCTF = Capture the Flag - AS = Assault.\n";
cin >> gametype;
string str = "\n\nMap=(FileName=\"";
str.append (filename"\",LongName=\"");
str.append (longname"\",Screenshot=\"MapThumbnails.DM_Canyon\",Text=\"Xmaps.GEO_CanyonSmall\",IdealPlayerCountMin=1,IdealPlayerCountMax=16,GoalScore=30,TimeLimit=10,FragLimit=10,SupportedGames=\"");
str.append (gametype"\",bSplitScreenOK=1,bNetworkOK=1");
ofstream myFile("xmaplist.int", ios:app);
if (! myFile)
{
cout << "Error opening output file" << endl;
return -1;
}
myFile << str << endl;
myfile.close();
return 0;
}
|
These are the errors I get:
c:\documents and settings\timbo\my documents\visual studio 2008\projects\map and load updater\map and load updater\main.cpp(22) : error C2143: syntax error : missing ')' before 'string'
1>c:\documents and settings\timbo\my documents\visual studio 2008\projects\map and load updater\map and load updater\main.cpp(22) : error C2059: syntax error : ')'
1>c:\documents and settings\timbo\my documents\visual studio 2008\projects\map and load updater\map and load updater\main.cpp(23) : error C2143: syntax error : missing ')' before 'string'
1>c:\documents and settings\timbo\my documents\visual studio 2008\projects\map and load updater\map and load updater\main.cpp(23) : error C2059: syntax error : ')'
1>c:\documents and settings\timbo\my documents\visual studio 2008\projects\map and load updater\map and load updater\main.cpp(24) : error C2143: syntax error : missing ')' before 'string'
1>c:\documents and settings\timbo\my documents\visual studio 2008\projects\map and load updater\map and load updater\main.cpp(24) : error C2059: syntax error : ')'
1>c:\documents and settings\timbo\my documents\visual studio 2008\projects\map and load updater\map and load updater\main.cpp(26) : error C2275: 'std::ios' : illegal use of this type as an expression
1> c:\program files\microsoft visual studio 9.0\vc\include\iosfwd(705) : see declaration of 'std::ios'
1>c:\documents and settings\timbo\my documents\visual studio 2008\projects\map and load updater\map and load updater\main.cpp(26) : error C2143: syntax error : missing ')' before ':'
1>c:\documents and settings\timbo\my documents\visual studio 2008\projects\map and load updater\map and load updater\main.cpp(26) : error C2448: 'myFile' : function-style initializer appears to be a function definition
1>c:\documents and settings\timbo\my documents\visual studio 2008\projects\map and load updater\map and load updater\main.cpp(26) : error C2059: syntax error : ')'
1>c:\documents and settings\timbo\my documents\visual studio 2008\projects\map and load updater\map and load updater\main.cpp(28) : error C2065: 'myFile' : undeclared identifier
1>c:\documents and settings\timbo\my documents\visual studio 2008\projects\map and load updater\map and load updater\main.cpp(34) : error C2065: 'myFile' : undeclared identifier
1>c:\documents and settings\timbo\my documents\visual studio 2008\projects\map and load updater\map and load updater\main.cpp(35) : error C2065: 'myfile' : undeclared identifier
1>c:\documents and settings\timbo\my documents\visual studio 2008\projects\map and load updater\map and load updater\main.cpp(35) : error C2228: left of '.close' must have class/struct/union
1> type is ''unknown-type''