Monday, March 22, 2010

Binary files with the read and write() operations in c++

/ binary files with the read and write() operations
char filename[15]="BINARY";

void main()
float height[4]={175.5,153.0,167.25,160.70};
ofstream outfile(filename);// create output file stream object
outfile.write((char *)&height,sizeof(height)); // write to the file
outfile.close();//disconnect from binary file

ifstream infile(filename);//create input filestream object *)&height,sizeof(height));//read from file

for(int i=0;i<4;i++)
cout.setf(ios::showpoint);//set format from one to another
// setprecision for floating point after decimal

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...