473,763 Members | 5,610 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

typedef issues with VC 8.0

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 * getInstanceData Map();
};

Can anybody help Please..??

Thank you

Dec 14 '06 #1
5 1832
tissyrose wrote:
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 * getInstanceData Map();
};

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/ho...t.html#faq-5.8

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

Cheers! --M

Dec 14 '06 #2
This is just a compile error .. May be the issue with the typedef like
class MyData {
typedef CMap<CStringEx, const CStringEx &, void *, void *DataMap;

static DataMap * getInstanceData Map();
};
With typedef it says ":cannot access private typedef declared in class"
under vc 8 compiler..

Cheers
mlimber wrote:
tissyrose wrote:
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 * getInstanceData Map();
};

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/ho...t.html#faq-5.8

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

Cheers! --M
Dec 14 '06 #3

tissyrose wrote:
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 * getInstanceData Map();
};

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

Dec 14 '06 #4
tissyrose wrote:
mlimber wrote:
tissyrose wrote:
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 * getInstanceData Map();
};
>
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/ho...t.html#faq-5.8

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

Cheers! --M

This is just a compile error .. May be the issue with the typedef like
class MyData {
typedef CMap<CStringEx, const CStringEx &, void *, void *DataMap;
>
static DataMap * getInstanceData Map();
};
>
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/ho....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

Dec 14 '06 #5
"tissyrose" <Li*********@gm ail.comwrote in message
news:11******** **************@ 73g2000cwn.goog legroups.com...
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 * getInstanceData Map();
};

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, getInstanceData Map 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.
Dec 14 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3638
by: joe | last post by:
hi, after reading some articles and faq, i want to clarify myself what's correct(conform to standard) and what's not? or what should be correct but it isn't simply because compilers don't support. (first i compiled them with g++3.x. ERR means compiler will bark, otherwise it does accept it. Then the Comeau C/C++ 4.3.3 comes)
8
4698
by: Fred L. Kleinschmidt | last post by:
I need to know the largets value representable in a variable. However, I do not know the variable's true type - only that it is some kind of int. It may be any of the following: #typedef Newtype short; #typedef Newtype unsigned short; #typedef Newtype int; #typedef Newtype unsigned int; #typedef Newtype long; ....etc.
5
3590
by: Janice | last post by:
Always get segmentation fault for the following code. If the data is primitive type instead, it will be fine. What is the problem? Thanx main(){ typedef int pid_t; pid_t pid=12; pid_t* ary; int count=0;
15
5678
by: Merrill & Michele | last post by:
typedef struct { WORD versionNumber; WORD offset; } MENUITEMTEMPLATEHEADER; This is from vol 5 of unnamed platform's programmer's reference. I could make this conforming by enclosing everything in a /*...*/ comment and appending the 'hail world' code. Is there an easier, and, let's say, more
16
3843
by: burn | last post by:
Hello, i am writing a program under linux in c and compile my code with make and gcc. Now i have 4 files: init.c/h and packets.c/h. Each header-file contains some: init.h: struct xyz {
134
9065
by: jacob navia | last post by:
Hi Suppose you have somewhere #define BOOL int and somewhere else typedef BOOL int;
17
3316
by: Steve Carter | last post by:
Can someone please explain why the following is not possible? typedef foobar { int x; foobar *next; /* why can't we do this? */ }; Thanks
13
1856
by: miaohua1982 | last post by:
the code is as follows: #include <iostream> using namespace std; typedef double DOUBLE; class Screen { public: typedef int DOUBLE;
8
40471
by: cman | last post by:
What does this kind of typedef accomplish? typedef struct { unsigned long pte_low; } pte_t; typedef struct { unsigned long pgd; } pgd_t; typedef struct { unsigned long pgprot; } pgprot_t I am familiar with "typedef int NUMBER", but how does it work with structures. Tilak
0
9563
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10144
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9997
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9937
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7366
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5270
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3917
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3522
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2793
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.