Besides not deleting the array (which shouldn't really be a problem since when the program ends, the OS cleans things up), the function itoa is non-standard. It also assumes WIndows with the system("pause") crap. It's also a C++ program that's using printf, but that's just bad style.