Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Weber01

Member
  • Content Count

    17
  • Joined

  • Last visited

Awards


This user doesn't have any awards

About Weber01

  • Title
    Newbie

Contact Methods

Profile Information

  • Gender
    Male

System

  • CPU
    i7 8700k
  • Motherboard
    Asrock Z370
  • RAM
    Cruscial Ballistic Sport LT 64Gb
  • GPU
    Zotac 1080 ti amp extreme
  • Case
    Cooler Master master case
  • Operating System
    Windows, MacOS, Manjaro
  1. Weber01

    Writing file in c++

    I tried to put getline also in the first procedure but once you run the code typing "1" does not work either. As for the switch selection I can not put getline because it's an integer
  2. Weber01

    Writing file in c++

    then?
  3. Weber01

    Writing file in c++

    2018-11-09 23-10-06.mp4
  4. Weber01

    Writing file in c++

    I do not understand why using the getline method this is bypassed and the program proceeds going forward without inserting the input
  5. Weber01

    Writing file in c++

    This is my code #include <iostream> #include <fstream> using namespace std; bool a = false; int selezione; string testo,nome; char ch; //create file void crea_file(){ ofstream myfile; cout<<"Inserisci il nome del file (con estensione): "; cin>>nome; myfile.open (nome); myfile.close(); system("clear"); } //write file void scrivi_file(){ ofstream myfile; myfile.open (nome, ios::in); cout<<"scrivi il contenuto del file! :\n"; getline (cin,testo); myfile<<testo; myfile.close(); system("clear"); } //read file void leggi_file(){ ifstream myfile; myfile.open (nome); system("clear"); cout<<"Il contenuto di "<<nome<<" è\n\n"; while (!myfile.eof()) { myfile.get(ch); cout<< ch; } cout<<"\n\n\n"; myfile.close(); } int main (){ do{ a==false; cout<<"Digita 1 per creare un file\n"; cout<<"Digita 2 per scrivere\n"; cout<<"Digita 3 per leggere il file\n"; cin>> selezione; system("clear"); switch (selezione) { case 1: crea_file(); break; case 2: scrivi_file(); break; case 3: leggi_file(); break; default: a=true; break; } }while (a!=true); cout<<"Arrivederci!"; } Thanks for your Answer
  6. Weber01

    Writing file in c++

    Hi guys, I have a problem, in a nutshell I would like to create a program in C ++ that reads user input and puts it in a file. I managed to do everything except to write the file, that is, when the user inserts the text in the file is written only the word that comes before the space, how can I make it print all the text entered by the user?
  7. Weber01

    Read and write files on c ++

    Thank you so much!
  8. Weber01

    Read and write files on c ++

    Hi, recently At school we studied the function to read and write files on c ++, can you explain to me how it works? For example if I want to create a program that draws a menu made with a switch typing "1" creates a file, typing "2" allows you to write to and typing "3" allows you to read it how should I do? can I create multiple files with the same program? Thank you
  9. Weber01

    Where to find games for GBA

    I'll try, thank you
  10. Weber01

    Where to find games for GBA

    Thanks for the reply, as I said I know where to find the Roms but I do not know if they are compatible with the original GBA. Do you think they are compatible?
  11. hi guys, I recently bought the EZ-FLASH IV for my GBA. I managed to make it work quietly, but I do not know where I can find the games, I know where to find the various roms but I do not know if they are compatible with the original GBA. Can you help me? thank you
  12. ok, if I have problems I'll tell you
  13. I would like to have a graphical interface. This web service must function as if it were a database from which it must receive and send information
  14. I will give him a look. Thank you
  15. The next time I meet him I have to bring him the project
×