mardi 24 février 2015

Replace XXX characters in character array to an int value in C++

I have a character array of some size in C++ program



char current_time[30];


The value of the character array is 2015-02-24T21:39:02.xxx+0800


The "xxx" in the character array must be replaced with a three digit number which is stored in a integer.


How can I replace efficiently without using for loop in C++? The position of the XXX is also known in the character array.


Aucun commentaire:

Enregistrer un commentaire