Thread View: pl.comp.os.linux.programowanie
4 messages
4 total messages
Started by RM
Fri, 28 Aug 2020 07:31
unordered_map jako szablon
Author: RM
Date: Fri, 28 Aug 2020 07:31
Date: Fri, 28 Aug 2020 07:31
14 lines
1327 bytes
1327 bytes
Uczę się C++. Nie rozumiem dlaczego mam błąd w poniższej definicji typu: typedef std::unordered_map<std::string /* found string in apostrophes */, std::string /* key in $GLOBALS */> strings_map; Oto ten błąd: src/common.hpp:70:14: error: ‘unordered_map’ in namespace ‘std’ does not name a template type typedef std::unordered_map<std::string /* found string in apostrophes */, std::string /* key in $GLOBALS */> strings_map; Przecież klasa std::unordered_map to szablon.
Re: unordered_map jako szablon
Author: RM
Date: Fri, 28 Aug 2020 08:01
Date: Fri, 28 Aug 2020 08:01
1 lines
967 bytes
967 bytes
Tzn. próbowałem opcji -std=c++11 albo -std=c++0x i nie pomogło, nadal błąd.
Re: unordered_map jako szablon
Author: heby
Date: Fri, 28 Aug 2020 08:33
Date: Fri, 28 Aug 2020 08:33
5 lines
1249 bytes
1249 bytes
On 28/08/2020 09:31, RM wrote: > src/common.hpp:70:14: error: ‘unordered_map’ in namespace ‘std’ does not > name a template type #include <unordered_map> masz?
Re: unordered_map jako szablon
Author: RM
Date: Fri, 28 Aug 2020 09:49
Date: Fri, 28 Aug 2020 09:49
8 lines
1198 bytes
1198 bytes
W dniu 28.08.2020 o 10:33, heby pisze: > On 28/08/2020 09:31, RM wrote: >> src/common.hpp:70:14: error: ‘unordered_map’ in namespace ‘std’ does >> not name a template type > > #include <unordered_map> masz? Dodałem typedef później i zapomniałem dopisać include. Dzięki!
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads