Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


C++ map question.(Solved)

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Dr.Disrespect
Grandmaster Cheater
Reputation: 3

Joined: 17 Feb 2016
Posts: 526

PostPosted: Tue Aug 23, 2016 9:14 am    Post subject: C++ map question.(Solved) Reply with quote

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.



Capture1.JPG
 Description:
 Filesize:  37.87 KB
 Viewed:  4259 Time(s)

Capture1.JPG



Capture.JPG
 Description:
 Filesize:  40.5 KB
 Viewed:  4259 Time(s)

Capture.JPG


Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Tue Aug 23, 2016 1:42 pm    Post subject: Reply with quote

String is undefined since you did not include the header for it:
Code:
#include <string>

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Dr.Disrespect
Grandmaster Cheater
Reputation: 3

Joined: 17 Feb 2016
Posts: 526

PostPosted: Tue Aug 23, 2016 3:27 pm    Post subject: Reply with quote

atom0s wrote:
String is undefined since you did not include the header for it:
Code:
#include <string>



Thank a lot, atom0s.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites