Portál AbcLinuxu, 15. prosince 2025 19:15
#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.