concatenation - A more elegant way to concatenate C strings in C++? -
I was wondering if this was the least to do .... I have an assignment that puts the credit card information in the UDP packet, with a separate notification by the colon in buffer, so that it looks like C ++ In, you can add In both C and C ++ you have access to the formatted output, which I think it has been liked, because the whole code is neatly fitted, a single row: < pre> Bob Jones: 7845 6133 7889 4425: 09/2017: 654.99 stored In a single character array.
int main (int argc, char ** argv) {four buffers [256]; Four names [64]; Four card new [32]; Four Ends [8]; Four zodiac sign [14]; While (true) {/ ********* (input prompt go here, break on leaving user type) ******** / strcpy (buffer, amount); Int length = Strellan (buffer); Buffer [length] = ':'; Dome (buffer, cardam); Length = stellen (buffer); Buffer [length] = ':'; Dome (buffer, name); Length = stellen (buffer); Buffer [length] = ':'; Dome (buffer, end); / ****************************************************************************** All networking codes );
std :: string to attach
+ , or A to the object.
sprintiff (buffer, "% s:% s:% s:% s", volume, card name, name, expiration);
Comments
Post a Comment