MSVC does not know cstring-use string-for toString

(cherry picked from commit fe9d2b9bc6)
This commit is contained in:
Krishna Vedala 2020-05-26 10:06:01 -04:00
parent 64c8bf38bd
commit a15b5c5a9b
No known key found for this signature in database
GPG Key ID: BA19ACF8FC8792F7

View File

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