How can I format string of int type

  • Thread starter Thread starter wonil kim
  • Start date Start date
W

wonil kim

Hello again,

How can I implement this C source code in C# :

int a = 9;
char tmp[10];

sprintf(tmp, "%.2d", a);

cout << tmp; // result is "09"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top