// boost_.cpp : 定义控制台应用程序的入口点。
//

#include "stdafx.h"
#include <stdlib.h>
#include <iostream>
#include <boost/format.hpp>

using namespace std;
//类似c的sprintf,MFC的Format.
int _tmain()
{
cout << boost::format("%2.3f, %d,%s") % 1.23456 % 12 % "test" << endl;

boost::format fmt = boost::format("%s %d ") % "123" % 57;
std::string s = fmt.str();
cout << s << endl;

cout << boost::format("x=%1%, y=%2% ,z= %3%") % "test" % 40.2 % 134 << endl;

getchar();
return 0;
}