typedef issues with VC 8.0

T

tissyrose

Hi All,

I am porting a very large application from VC++ 6.0 to VS 2005. There
are many issues I am facing. One of them is I am getting an error

"cannot access private typedef declared in class" . I removed the
typedef then I am getting the following error.
syntax error missing ';' before '*'
Below is the code snippet..

class MyData {
CMap<CStringEx, const CStringEx &, void *, void *> DataMap;

static DataMap * getInstanceDataMap();
};

Can anybody help Please..??

Thank you
 
M

mlimber

tissyrose said:
I am porting a very large application from VC++ 6.0 to VS 2005. There
are many issues I am facing. One of them is I am getting an error

"cannot access private typedef declared in class" . I removed the
typedef then I am getting the following error.

That is probably not the right solution, and it results in the error
you describe below.
syntax error missing ';' before '*'
Below is the code snippet..

class MyData {
CMap<CStringEx, const CStringEx &, void *, void *> DataMap;

static DataMap * getInstanceDataMap();
};

Can anybody help Please..??

Probably, but you have to help us to help you. Follow the posting
guidelines for code that doesn't work:

http://parashift.com/c++-faq-lite/how-to-post.html#faq-5.8

The gist: post a minimal but complete sample that demonstrates the
problem.

Cheers! --M
 
T

tissyrose

This is just a compile error .. May be the issue with the typedef likeWith typedef it says ":cannot access private typedef declared in class"
under vc 8 compiler..

Cheers
 
S

Salt_Peter

tissyrose said:
Hi All,

I am porting a very large application from VC++ 6.0 to VS 2005. There
are many issues I am facing. One of them is I am getting an error

"cannot access private typedef declared in class" . I removed the
typedef then I am getting the following error.
syntax error missing ';' before '*'
Below is the code snippet..

class MyData {
CMap<CStringEx, const CStringEx &, void *, void *> DataMap;

static DataMap * getInstanceDataMap();
};

Can anybody help Please..??

Thank you

Doesn't MS have a solution for that using CMapEx? Also, void*s are
frowned upon in C++ since they render a compiler blind. However, since
there is no such thing as a CMap in C++ , i'ld suggest posting your
question to a relevent newsgroup.

[5.9] Which newsgroup should I post my questions?
http://www.parashift.com/c++-faq-lite/how-to-post.html
 
M

mlimber

tissyrose said:
This is just a compile error .. May be the issue with the typedef like
With typedef it says ":cannot access private typedef declared in class"
under vc 8 compiler..

Please don't top-post
(http://parashift.com/c++-faq-lite/how-to-post.html#faq-5.4). I've
fixed it here.

As for your problem, it's still not minimal and complete because I
can't copy and paste it into my editor without adding things like CMap
and CStringEx. Please try again.

Cheers! --M
 
J

Jim Langston

tissyrose said:
Hi All,

I am porting a very large application from VC++ 6.0 to VS 2005. There
are many issues I am facing. One of them is I am getting an error

"cannot access private typedef declared in class" . I removed the
typedef then I am getting the following error.
syntax error missing ';' before '*'
Below is the code snippet..

class MyData {
CMap<CStringEx, const CStringEx &, void *, void *> DataMap;

static DataMap * getInstanceDataMap();
};

Can anybody help Please..??

Thank you

If I try to compile this I'll get a lot of errors, such as CMap is not
defined. CStringEx is not defined, getInstanceDataMap is not defined,
etc...

Write a small program that you are trying to compile that gives the error.
And post the code here.

The snippet you have shown is not enough information to tell you what is
wrong.

If you don't do that, then check your program on line 42, there's the error.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,170
Latest member
Andrew1609
Top