MSVC does not know cstring-use string-for toString

This commit is contained in:
Krishna Vedala 2020-05-26 10:06:01 -04:00
parent 8bc1559b08
commit fe9d2b9bc6
No known key found for this signature in database
GPG Key ID: BA19ACF8FC8792F7

View File

@ -1,7 +1,13 @@
#include <algorithm> #include <algorithm>
#include <cstring>
#include <iostream> #include <iostream>
#ifdef _MSC_VER
// Required to compile std::toString function using MSVC
#include <string>
#else
#include <cstring>
#endif
int main() { int main() {
int num; int num;
std::cout << "Enter number = "; std::cout << "Enter number = ";