Click here to Skip to main content
16,008,750 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Local IP address Pin
JohnnyG12-Jun-02 13:34
JohnnyG12-Jun-02 13:34 
Generalmap or list? You decide! Pin
moredip12-Jun-02 12:04
moredip12-Jun-02 12:04 
GeneralRe: map or list? You decide! Pin
12-Jun-02 12:13
suss12-Jun-02 12:13 
GeneralRe: map or list? You decide! Pin
moredip12-Jun-02 12:15
moredip12-Jun-02 12:15 
GeneralRe: map or list? You decide! Pin
Tim Smith12-Jun-02 12:25
Tim Smith12-Jun-02 12:25 
GeneralRe: map or list? You decide! Pin
moredip12-Jun-02 12:39
moredip12-Jun-02 12:39 
GeneralRe: map or list? You decide! Pin
Alexandru Savescu13-Jun-02 6:01
Alexandru Savescu13-Jun-02 6:01 
GeneralRe: map or list? You decide! Pin
soptest12-Jun-02 12:32
soptest12-Jun-02 12:32 
stl::map will work for you.

example for map with GUID* (128 bit) key type and BSTR value:

implement GUIDless to compare GUID's

struct GUIDless : public std::less<GUID*> 
{
	bool operator()(const GUID* _X, const GUID* _Y) const
	{
		if(((__int64*)_X)[0] < ((__int64*)_Y)[0])
			return true;
		
		if(((__int64*)_X)[0] == ((__int64*)_Y)[0])
		{
			if(((__int64*)_X)[1] < ((__int64*)_Y)[1])
				return true;		
			else
				return false;
		}
		return false; 
	}
};

declaration of map with( GUID*, BSTR) pair
std::map< GUID* /*id*/,BSTR /*Msg*/,GUIDless > mapGUID_BSTR;


soptest
QuestionIs there a way to read a given sector on a harddrive? Pin
redeemer12-Jun-02 10:52
redeemer12-Jun-02 10:52 
AnswerRe: Is there a way to read a given sector on a harddrive? Pin
12-Jun-02 11:17
suss12-Jun-02 11:17 
Generaldetermination of file type Pin
12-Jun-02 10:29
suss12-Jun-02 10:29 
GeneralRe: determination of file type Pin
redeemer12-Jun-02 10:48
redeemer12-Jun-02 10:48 
GeneralRe: determination of file type Pin
12-Jun-02 10:53
suss12-Jun-02 10:53 
GeneralRe: determination of file type Pin
redeemer12-Jun-02 11:00
redeemer12-Jun-02 11:00 
GeneralRe: determination of file type Pin
12-Jun-02 11:05
suss12-Jun-02 11:05 
GeneralRe: determination of file type Pin
redeemer12-Jun-02 11:32
redeemer12-Jun-02 11:32 
GeneralRe: determination of file type Pin
Roger Wright12-Jun-02 13:25
professionalRoger Wright12-Jun-02 13:25 
GeneralRe: determination of file type Pin
Matt Gullett12-Jun-02 13:46
Matt Gullett12-Jun-02 13:46 
General10x Pin
12-Jun-02 14:07
suss12-Jun-02 14:07 
GeneralRe: determination of file type Pin
Nish Nishant12-Jun-02 14:31
sitebuilderNish Nishant12-Jun-02 14:31 
GeneralClosing VC++ exe from another application Pin
12-Jun-02 9:56
suss12-Jun-02 9:56 
GeneralRe: Closing VC++ exe from another application Pin
Alex Mitchell12-Jun-02 14:11
Alex Mitchell12-Jun-02 14:11 
GeneralRe: Closing VC++ exe from another application Pin
Nish Nishant12-Jun-02 14:32
sitebuilderNish Nishant12-Jun-02 14:32 
GeneralModeless dialog Pin
Gary Kirkham12-Jun-02 9:06
Gary Kirkham12-Jun-02 9:06 
GeneralRe: Modeless dialog Pin
Rickard Andersson2012-Jun-02 9:20
Rickard Andersson2012-Jun-02 9:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.