C language implementation
# Include <stdio. h>
File * FPO;
File * FPT;
Int main (INT argc, char ** argv)
{
FPO = fopen ("po.txt", "W + ");
FPT = fopen ("pt.txt", "W + ");
Fprintf (FPO, "% d \ t % d \ n", pt1.x, pt1.y );
Fprintf (FPT, "% d \ t % d \ n", pt2.x, pt2.y ); // Note that if integer data is output as a floating point, the result is 0.
Fclose (FPO );
Fclose (FPT );
Printf ("\ n Alt at the same time and right-click the button and press it to narrow down the matching result chart \ n"); // output data to the display terminal
Fprintf (stderr, "Finding features in % s... \ n", img2_file );
}
/////////////////////////////////////
Implementation of C ++
# Include <iostream>
# Include <fstream>
Using namespace STD;
Int main (INT argc, char ** argv)
{
Ofstream poi1, poi2;
Poi1.open ("point_o.txt", IOS: Out | IOs: APP );
Poi1.setf (IOs: fixed, IOS: floatfield );
Poi1.setf (IOs: showpoint );
Poi2.open ("point_t.txt", IOS: Out | IOs: APP );
Poi2.setf (IOs: fixed, IOS: floatfield );
Poi2.setf (IOs: showpoint );
Poi1 <matches [I]. First. x<"\ T" <matches [I]. First. Y<Endl;
Poi2 <matches [I]. Second. x <"\ t" <matches [I]. Second. Y <Endl;
Poi1.close ();
Poi2.close ();
STD: cout <"Matches:" <matches. Size (); // output data to the display terminal
}
// If the C ++ output method is used to output data to the TXT file in the source file suffixed with C, the vs2008 compiler may report an error. The solution is to change the suffix to CPP, create a new project, and then use the C ++ output method, which is more convenient. If some illegal keywords are used in the C file, modify the definitions of these variables to avoid repeated definitions with the keywords of C ++.
Http://blog.sina.com.cn/s/blog_702eac8701013k5m.html