#include<iostream>
#include<string>
#include<stdio.h>
using namespace std;
int main()
{
char szPath[128] = {0};
string picName("123.jpg");
//sprintf(szPath, "/mnt/sdcard/Picture/%s", picName); // 这样写法 拼接出来的就是 /mnt/sdcard/Picture/(null)
//一定要这样写
sprintf(szPath, "/mnt/sdcard/Picture/%s", picName.c_str());
return 0;
}