Portál AbcLinuxu, 10. května 2025 07:13
#include <string> - v .h nefunguje #include <sstream> - v .h nefunguje #ifndef _TR_H #define _TR_H class Trida { private: bool **pozice; stringstream s; - tento typ to nezná public: funkce(string const& parametr); -- nezná string ....
Řešení dotazu:
#include
v .h
samozřejmě funguje, ale zmiňované typy jsou součástí namespace std. Takže např.
funkce(std::string const& parametr); -- nezná stringa je to. V .cpp ti to funguje jinak asi proto, že máš někde
using namespace std
. Dát to do hlavičky by nebylo moudré.
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.