mam tej funkcji w moim programie, który konwertuje liczby całkowite do strun:Qt C++ agregat „std :: stringstream ss” ma niekompletną typu i nie mogą być definiowane
QString Stats_Manager::convertInt(int num)
{
stringstream ss;
ss << num;
return ss.str();
}
Ale gdy kiedykolwiek uruchomić to pojawia się błąd :
aggregate 'std::stringstream ss' has incomplete type and cannot be defined
Nie jestem naprawdę pewien, co to oznacza. Ale jeśli teraz, jak to naprawić lub potrzebujesz więcej kodu, po prostu skomentuj. Dzięki.
'' #include –
Managu
Tak na marginesie, QString ma statyczną funkcję konstruowania ciąg od liczby. Jest to [QString :: number] (http://doc.qt.nokia.com/4.8-snapshot/qstring.html#number). – cgmb