PDA

View Full Version : Sprintf in QT ?



wilcd
28th April 2012, 10:45
i need to port some code to qt but i dont find the way to use sprinft yet ... my idea is open a specific .jpg file using a readed str value

this ...

FILE *openingjpg;

char jpgname[256];
sprintf ( jpgname, "/mytempfolder/%s/%s.jpg",str,str);

printf("EL NOMBRE DEL JPG PARA ABRIR ES : %s \n\n",jpgname);

openingjpg=fopen(jpgname,"ab");


anyone give me a help ?
thanks in advance

AlekseyOk
28th April 2012, 11:05
QString jpgname(QString("/mytempfolder/%1/%1.jpg").arg(str));