Skip to content

Commit fe9d2b9

Browse files
committed
MSVC does not know cstring-use string-for toString
1 parent 8bc1559 commit fe9d2b9

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

others/palindrome_of_number.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
#include <algorithm>
2-
#include <cstring>
32
#include <iostream>
43

4+
#ifdef _MSC_VER
5+
// Required to compile std::toString function using MSVC
6+
#include <string>
7+
#else
8+
#include <cstring>
9+
#endif
10+
511
int main() {
612
int num;
713
std::cout << "Enter number = ";

0 commit comments

Comments
 (0)