Click here to Skip to main content
15,922,574 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: SHGetSpecialFolderLocation Pin
Maxime Labelle11-Jul-06 21:53
Maxime Labelle11-Jul-06 21:53 
GeneralRe: SHGetSpecialFolderLocation [modified] Pin
Jonas Hammarberg11-Jul-06 22:20
professionalJonas Hammarberg11-Jul-06 22:20 
GeneralRe: SHGetSpecialFolderLocation Pin
Maxime Labelle12-Jul-06 3:36
Maxime Labelle12-Jul-06 3:36 
QuestionDifficult to understand PrintPreview without Doc/View Pin
mikobi11-Jul-06 20:15
mikobi11-Jul-06 20:15 
QuestionSELECT * FROM - Tablename which has spaces Pin
Tara1411-Jul-06 20:09
Tara1411-Jul-06 20:09 
AnswerRe: SELECT * FROM - Tablename which has spaces Pin
Steve Echols11-Jul-06 20:35
Steve Echols11-Jul-06 20:35 
GeneralRe: SELECT * FROM - Tablename which has spaces Pin
Tara1411-Jul-06 20:43
Tara1411-Jul-06 20:43 
GeneralRe: SELECT * FROM - Tablename which has spaces Pin
Tara1411-Jul-06 20:50
Tara1411-Jul-06 20:50 
AnswerRe: SELECT * FROM - Tablename which has spaces Pin
toxcct11-Jul-06 21:14
toxcct11-Jul-06 21:14 
QuestionOwner Draw Pin
Try11-Jul-06 19:56
Try11-Jul-06 19:56 
AnswerRe: Owner Draw Pin
led mike11-Jul-06 20:11
led mike11-Jul-06 20:11 
GeneralRe: Owner Draw Pin
Code_Zombie11-Jul-06 20:25
Code_Zombie11-Jul-06 20:25 
AnswerRe: Owner Draw Pin
Hamid_RT11-Jul-06 23:10
Hamid_RT11-Jul-06 23:10 
QuestionProblem with STL Pin
Super Lloyd11-Jul-06 19:28
Super Lloyd11-Jul-06 19:28 
AnswerRe: Problem with STL Pin
Steve Echols11-Jul-06 19:40
Steve Echols11-Jul-06 19:40 
GeneralRe: Problem with STL [modified] Pin
Super Lloyd11-Jul-06 19:50
Super Lloyd11-Jul-06 19:50 
GeneralRe: Problem with STL Pin
Steve Echols11-Jul-06 20:48
Steve Echols11-Jul-06 20:48 
AnswerRe: Problem with STL Pin
Super Lloyd11-Jul-06 19:50
Super Lloyd11-Jul-06 19:50 
GeneralRe: Problem with STL [modified] Pin
Super Lloyd11-Jul-06 20:14
Super Lloyd11-Jul-06 20:14 
AnswerRe: Problem with STL [modified] Pin
Stephen Hewitt11-Jul-06 20:55
Stephen Hewitt11-Jul-06 20:55 
Your problem has nothing to do with maps: it's a simple pointer error. Here's the relevant bits of your code:
std::map<SEL, IMP> * class_imps; // here I get the problematic "map *"
// ...
class_imps[sel] = imp;  // can't do that with 'map*', what should I so?
// ...


class_imps is a pointer but you're using it as if it was a map. This should look like this:
(*class_imps)[sel] = imp;


Here's an example to make this clearer:
class Foo
{
    void Bar();
};
 
void SomeFunction()
{
    Foo *pFoo = new Foo();
    pFoo.Bar(); // Error. Should be pFoo->Bar() or (*pFoo).Bar().
    delete pFoo;
}


Steve

-- modified at 3:01 Wednesday 12th July, 2006

PS: Use typedefs instead or repeating the long map types all over the place.
GeneralRe: Problem with STL Pin
Super Lloyd11-Jul-06 21:02
Super Lloyd11-Jul-06 21:02 
GeneralRe: Problem with STL Pin
Stephen Hewitt11-Jul-06 21:15
Stephen Hewitt11-Jul-06 21:15 
GeneralRe: Problem with STL Pin
Super Lloyd11-Jul-06 21:39
Super Lloyd11-Jul-06 21:39 
GeneralRe: Problem with STL Pin
Stephen Hewitt11-Jul-06 21:50
Stephen Hewitt11-Jul-06 21:50 
GeneralRe: Problem with STL Pin
Super Lloyd11-Jul-06 22:11
Super Lloyd11-Jul-06 22:11 

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.