473,397 Members | 1,960 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

CObject Private method access error

NKH
Hi,

I am trying to recompile application that has been developed in VC++
6.0 with VC++2005..
While compiling, I'm getting the following error..
error C2248: 'CObject::CObject' : cannot access private member declared

in class 'CObject'
1 c:\program files\microsoft visual studio
8\vc\atlmfc\include\afx.h(553) : see declaration of 'CObject::CObject'
1 c:\program files\microsoft visual studio
8\vc\atlmfc\include\afx.h(524) : see declaration of 'CObject'
1 This diagnostic occurred in the compiler generated function
'CException::CException(const CException &)'
Our application have a custom exception class derived from CException
which in turn implements a copy constructor
CSException (const CSException &ToCopy);
The code from which this exception is called as below..
throw CSException (Msg, __FILE__, __LINE__);
Please let me know what could be wrong here and how I can overcome
this..
Thanks,
Nishant

Jan 4 '07 #1
3 3480
NKH wrote:
Hi,

I am trying to recompile application that has been developed in VC++
6.0 with VC++2005..
While compiling, I'm getting the following error..
Nishant:

Please don't multi-post. See reply in MFC group.

David Wilkinson
Jan 4 '07 #2
NKH
Hi,
I'm sorry..I thought this group would be more appropriate than MFC in
VC++ 6.0
Thanks,
Nishant

David Wilkinson wrote:
NKH wrote:
Hi,

I am trying to recompile application that has been developed in VC++
6.0 with VC++2005..
While compiling, I'm getting the following error..

Nishant:

Please don't multi-post. See reply in MFC group.

David Wilkinson
Jan 5 '07 #3
NKH wrote:
Hi,
I'm sorry..I thought this group would be more appropriate than MFC in
VC++ 6.0
Nishant:

microsoft.public.vc.mfc is the MFC newsgroup, not just for VC6. CObject
is an MFC class.

But it is not so important which group you use, just that you do not
multi-post. Most people who can answer these questions read all the
VC-related groups.

If you feel you must target more than one group, then cross-post, never
multi-post.

And you might think about not top-posting ....

David Wilkinson
Jan 5 '07 #4

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

Similar topics

3
by: IHateSuperman | last post by:
public class StaticField2{ public static void main(String args){ private int x, y; // <<== error 1 for ( y = 0 ; y < 100 ; y++){ x = StaticMethod(); System.out.println(" x = "+x); } } public...
6
by: vijay | last post by:
Hello I wanted to understand a contradictory design of C++ class A {public: virtual void f(){ cout<<" base f"<<endl; } }; class B:public A {
3
by: quo | last post by:
two questions: 1) Does this program demonstrate the basic difference between public and private access? It appears correct to say that instances of a class cannot directly call a private...
10
by: Martin Vorbrodt | last post by:
Example code in one of my books intrigues me: class B { public: B* Clone() const { B* p = DoClone(); assert(typeid(*p) == typeid(*this)); return p; }
2
by: Christoph Boget | last post by:
Let's take the following class: class MyClass { private int privateVar; public int PublicVar { get { return privateVar; } } public MyClass() {}
14
by: v4vijayakumar | last post by:
Why we need "virtual private member functions"? Why it is not an (compile time) error?
1
by: Bryan | last post by:
How do I properly use CObject? What include file do I need? If I try to do this: class TestClass : public CObject { public: TestClass() {}; ~TestClass() {}; }
2
by: Bryan | last post by:
If I have this: // .h class Base : public CObject { public: DECLARE_DYNAMIC(Base) } class Derived : public Base {
7
by: Rahul | last post by:
Hi Everyone, I was trying to implement a final class and i start having the destructor of the final class as private, class A { ~A() { printf("destructor invoked\n");
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...
0
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...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.