A Very Simple Language Related Question

Правка en1, от NeverSayNever, 2016-11-19 09:38:14

I want to write a function that accepts one string and one integer and return concatenation of both but i always want integer to be fixed width say 3.

e.g. if string is "jamesbond" and integer is 7, function should return a string "jamesbond007". How to do it in C++ ?

Note: I dont want to write if else and other conditional statements. Thank you.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский NeverSayNever 2016-11-19 09:38:14 397 Initial revision (published)