here's the code:
#include<iostream>
#include<string.h>
#include<fstream>
using namespace std;
int main()
{
const int size = 50;
char string[size];
cout<<"Enter string:";
cin>>string;
int len = strlen(string);
fstream file;
file.open("text",ios::in|ios::out);
for(int i = 0;i<len;i++)
{
file.put(string[i]);
}
cout<<"output : "; //<-problem from here
file.seekg(0);
char ch;
okay the problem with this is that whenever you enter a string ...and press enter, the control skips the code after the output statement as shown above..it displays the message" output: "
but there is no actual output and then the program terminates.