Advertisement
Guest User

Untitled

a guest
Feb 19th, 2020
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.19 KB | None | 0 0
  1. #include <iostream>
  2. #include <stdio.h>
  3.  
  4. int main()
  5. {
  6.     char* str;
  7.     str = new char[20];
  8.     int n = 5;
  9.     sprintf(str, "%d", n);
  10.     std::cout << str << std::endl;
  11.     return 0;
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement