Originariamente inviato da cleaner
ah non sapevo che itoa non fosse compreso, comunque utilizzo codeblocks..
per quanto riguarda snprintf(pathfile,sizeof(pathfile),"%d",numero) funziona bene , tuttavia non ho capito cosa fa questa istruzione:
codice:
c[sizeof(c)-1]=0;
dopo la conversione ripristina a 0 la dimensione di c?Perchè?
Manuale C
#include <stdio.h>
int snprintf(char* buffer, size_t nsize, const char* fmt, ...);

Description :
Sends formatted output to a buffer of a maximum length specified by nsize.
If the number of bytes to output is:
< nsize, then all of the characters have been written, including the terminating ‘\0’ character.
== nsize, then nsize characters are written, with no terminating ‘\0’ character.
> nsize, then only nsize characters are written, with no terminating ‘\0’ character.
If nsize is 0, then the string will not be written to (and may be NULL).

Return Value

Number of bytes output, or, if nsize is 0, the number of bytes needed, not including the terminating ‘\0’ character.
Originariamente inviato da cleaner
Per quanto riguarda la ostringstream, a quale funzione ti riferisci in particolare?
codice:
	stringstream stream;
	int i = 123456;
	// stream.width(12); // Opzionali
	// stream.fill('0'); // Opzionali
	stream << i;
	cout << stream.str() << endl;