निम्नलिखित साधारण प्रोग्राम जीसीसी
#include <string>
#include <iostream>
int main()
{
std::cout << std::to_string(4) << std::endl;
return 0;
}
कमांड लाइन के साथ cygwin में संकलित नहीं किया जा सकता का एक सदस्य है :
to_string.cc: In function ‘int main()’:
to_string.cc:6:16: error: ‘to_string’ is not a member of ‘std’
std::cout << std::to_string(4) << std::endl;
जी ++ संस्करण:
$ g++ --version
g++ (GCC) 5.2.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
उसी कोड को उबंटू में संकलित किया जा सकता है।
क्या यह संभव है कि इस कोड को साइगविन के साथ संकलित करें या मुझे वर्कअराउंड लिखने की आवश्यकता है?
आप '-std = C++ 11' के बजाय' -std = C++ 0x' – NathanOliver
@NathanOliver ही परिणाम उपयोग करने की आवश्यकता हो सकती है। – Alex
क्या आपने जांच की है कि '' हेडर का उपयोग किया जाता है? –