Hi everyone,
I have got this code`
//----------------------------------------------------
#include <cstdlib>
#include <iostream>
#include <fstream>
using namespace std;
int main(int argc, char *argv[])
{
start:
ofstream examplefile ("example.txt");
examplefile<<"";
const int SIZE = 100;
char msg[SIZE];
cin.getline(msg,SIZE);
examplefile << msg;
examplefile.close();
cin.get();
system("cls");
goto start;
return 0;
}
//--------------------------------------------------------
And when I am compiling it the everything is allright at first time:it's asking you to enter some string and saving it to example.txt file
BUT, when I am writing the string again, it's not writing the first letter of that string into example.txt
I don't know what is the problem with it?
*for DMITRI KALININ*
Privet Dima, esli budit vremya pasmatri chto zdes ne vparyadke....
Vsye viglyadit i rabotait pravilno, NO v pervi raz....
Thanks for you help....
----------------------------------
Hunan Rostomyan
NJMedia Design Studio,
NJBIology Central.