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 5 1814
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 * 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/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 * getInstanceDataMap();
};
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 * 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/ho...t.html#faq-5.8
The gist: post a minimal but complete sample that demonstrates the
problem.
Cheers! --M
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 * 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
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 * 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/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 * getInstanceDataMap();
};
>
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
"tissyrose" <Li*********@gmail.comwrote in message
news:11**********************@73g2000cwn.googlegro ups.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 * 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. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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...
|
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...
|
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;...
|
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...
|
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
{
| |
by: jacob navia |
last post by:
Hi
Suppose you have somewhere
#define BOOL int
and somewhere else
typedef BOOL int;
|
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
|
by: miaohua1982 |
last post by:
the code is as follows:
#include <iostream>
using namespace std;
typedef double DOUBLE;
class Screen
{
public:
typedef int DOUBLE;
|
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...
|
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,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
| |
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...
|
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...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
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...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
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...
| |
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 ...
| |