Monday, March 22, 2010

The usage of get ( ) and put ( ) function using c++

#include // the usage of get ( ) and put ( ) function
#include
#include
void main()
{
clrscr();
char string[80];
cout<<"enter a string"<
cin>>string;
int len=strlen(string);
fstream file;
file.open("text",ios::in | ios::out);//opens a file in r/w mode
for (int i=0;i<=len;i++)
file.put(string[i]);//put a char in to a file
file.seekg(0);//go to start


char ch;
while(file)// to check for eof()
{
file.get(ch);
cout<
}
}

Action Method in Mvc

In this section, you will learn about the action method of controller class. All the public methods of a Controller class are called Act...