whats not working here its meant to make a text file that goes:
admin forceclass 1 spr
" " 2 spr
3 spr etc uip to 2000
im getin all kinds of errors wont compile
the type is at users discretion
help plzCode:#include <fstream> #include <iostream> #include <cstring> #include <windows.h> using namespace std; int main() { char cont[3]; char type[7]; cout << "this is the americas army admin forceclass file maker.\n"; sleep(60); cout << "this will make a .txt file anywere you have this program.\n"; sleep(60); cout << "i suggest you have this program on your desktop so the file will show up on your desktop.\n"; sleep(60); cout << "if this file is in a folder the .txt file will appear in the folder this program is in.\n"; sleep(60); cout << "Copyright Richard Wilson, made with the Dev-C++ Compiler Code supplied/created by Richard Wilson, all rights reserved\n\n"; sleep(60); cout << " do you wish to continue (y or n) \n"; sleep(60); cout << "Enter: "; cin.getline ( cont, 3 ); if ( strcmp ( cont, "n" ) == 0 ) { cout << "\npress enter to exit..."; cin.get(); } else if ( strcmp ( cont, "y" ) == 0 ) { cout << "\n what type of forceclass will it be?\n"; cout << " exaple spr rpg m4a1 s24 sf etc. to be forceclassed.\n"; cout << " NOTE: this will also be the file name if you choose spr the file will be spr.txt!\n"; cout << "please enter the type: "; cin.getline ( type, 7 ); cout << "n\ Thank you, please wait wile your file is created....."; ofstream forceclass ( ""<< 'type' <<".txt" ); if ( forceclass.is_open() ) { for ( int x = 1; x < 2001; ++x ) { forceclass << "admin forceclass "<< x << 'type' <<"\n"; sleep(300); cout << "\n File Succesfully Created! Press Enter!\n"; forceclass.close(); cin.ignore(); }; else { sleep(300); cout << "\n File Cannot Be Created, Press Enter\n"; cin.ignore(); } } cout << "This File (if created) will be located in the direcotry as previously described\n"; cout << "Copyright Richard Wilson 2005\n"; cout << "Contact Me at deathbydesire101@gmail.com if you discover any bugs...\n"; cout << " Press Enter\n"; cin.ignore(); } cout << " quit the program by pressing enter\n"; cout << "\n\n\n Thank You!"; cin.get(); }



LinkBack URL
About LinkBacks


