Posted: Tue Aug 23, 2016 9:14 am Post subject: C++ map question.(Solved)
I want to declare a map in the header file. But I keep getting error messages like "map is not a template", "identifier 'string' is undefined" etc. I did include the "map" library.
I am new to C++, I just want to use a data type like arrays but with string index.
BTW, I am using the "C++ Windows Form" template in Visual Studio 2015. My code is in the header file because when I click anything on the form in the designer, it automatically goes to the header file and generates code in the header file, such as textbox change or combobox change events.
Update: the problem is solved after I moved the declaration outside of the class.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum