473,608 Members | 2,689 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

faq how to solve this error

Hi,
I write a class
class CSegment
{
public:
CSegment(void);
public:
~CSegment(void) ;
public:
CArray< CList< CPoint, CPoint& >, CList< CPoint, CPoint& >& m_curve;
CArray< int, int& m_superindex;
CArray< bool, bool& m_direction;

};

and in Cmaxregionborde rView I add a member variable
class Cmaxregionborde rView : public CView
{
....
public:
Cmaxregionborde rDoc* GetDocument() const;

public:
CArray< CList< CSegment, CSegment& >, CList< CSegment, CSegment& >& >
m_bordersegment list;
....
};

when compile I got error as list below ,how to solve these error? Thanks a
lot.

------ Build started: Project: maxregionborder , Configuration: Debug
Win32 ------
Compiling...
maxregionborder .cpp
d:\program files\microsoft visual studio 8\vc\atlmfc\inc lude\afxtempl.h (272)
: error C2248: 'CObject::opera tor =' : cannot access private member declared
in class 'CObject'
d:\program files\microsoft visual studio
8\vc\atlmfc\inc lude\afx.h(554) : see declaration of 'CObject::opera tor ='
d:\program files\microsoft visual studio
8\vc\atlmfc\inc lude\afx.h(524) : see declaration of 'CObject'
This diagnostic occurred in the compiler generated function
'CArray<TYPE,AR G_TYPE&CArray<T YPE,ARG_TYPE>:: operator =(const
CArray<TYPE,ARG _TYPE&)'
with
[
TYPE=CList<CPoi nt,CPoint &>,
ARG_TYPE=CList< CPoint,CPoint &&
]
d:\program files\microsoft visual studio 8\vc\atlmfc\inc lude\afxtempl.h (272)
: error C2248: 'CObject::opera tor =' : cannot access private member declared
in class 'CObject'
d:\program files\microsoft visual studio
8\vc\atlmfc\inc lude\afx.h(554) : see declaration of 'CObject::opera tor ='
d:\program files\microsoft visual studio
8\vc\atlmfc\inc lude\afx.h(524) : see declaration of 'CObject'
This diagnostic occurred in the compiler generated function
'CArray<TYPE,AR G_TYPE&CArray<T YPE,ARG_TYPE>:: operator =(const
CArray<TYPE,ARG _TYPE&)'
with
[
TYPE=int,
ARG_TYPE=int &
]
d:\program files\microsoft visual studio 8\vc\atlmfc\inc lude\afxtempl.h (272)
: error C2248: 'CObject::opera tor =' : cannot access private member declared
in class 'CObject'
d:\program files\microsoft visual studio
8\vc\atlmfc\inc lude\afx.h(554) : see declaration of 'CObject::opera tor ='
d:\program files\microsoft visual studio
8\vc\atlmfc\inc lude\afx.h(524) : see declaration of 'CObject'
This diagnostic occurred in the compiler generated function
'CArray<TYPE,AR G_TYPE&CArray<T YPE,ARG_TYPE>:: operator =(const
CArray<TYPE,ARG _TYPE&)'
with
[
TYPE=bool,
ARG_TYPE=bool &
]
maxregionborder View.cpp
d:\program files\microsoft visual studio 8\vc\atlmfc\inc lude\afxtempl.h (272)
: error C2248: 'CObject::opera tor =' : cannot access private member declared
in class 'CObject'
d:\program files\microsoft visual studio
8\vc\atlmfc\inc lude\afx.h(554) : see declaration of 'CObject::opera tor ='
d:\program files\microsoft visual studio
8\vc\atlmfc\inc lude\afx.h(524) : see declaration of 'CObject'
This diagnostic occurred in the compiler generated function
'CArray<TYPE,AR G_TYPE&CArray<T YPE,ARG_TYPE>:: operator =(const
CArray<TYPE,ARG _TYPE&)'
with
[
TYPE=CList<CPoi nt,CPoint &>,
ARG_TYPE=CList< CPoint,CPoint &&
]
d:\program files\microsoft visual studio 8\vc\atlmfc\inc lude\afxtempl.h (272)
: error C2248: 'CObject::opera tor =' : cannot access private member declared
in class 'CObject'
d:\program files\microsoft visual studio
8\vc\atlmfc\inc lude\afx.h(554) : see declaration of 'CObject::opera tor ='
d:\program files\microsoft visual studio
8\vc\atlmfc\inc lude\afx.h(524) : see declaration of 'CObject'
This diagnostic occurred in the compiler generated function
'CArray<TYPE,AR G_TYPE&CArray<T YPE,ARG_TYPE>:: operator =(const
CArray<TYPE,ARG _TYPE&)'
with
[
TYPE=int,
ARG_TYPE=int &
]
d:\program files\microsoft visual studio 8\vc\atlmfc\inc lude\afxtempl.h (272)
: error C2248: 'CObject::opera tor =' : cannot access private member declared
in class 'CObject'
d:\program files\microsoft visual studio
8\vc\atlmfc\inc lude\afx.h(554) : see declaration of 'CObject::opera tor ='
d:\program files\microsoft visual studio
8\vc\atlmfc\inc lude\afx.h(524) : see declaration of 'CObject'
This diagnostic occurred in the compiler generated function
'CArray<TYPE,AR G_TYPE&CArray<T YPE,ARG_TYPE>:: operator =(const
CArray<TYPE,ARG _TYPE&)'
with
[
TYPE=bool,
ARG_TYPE=bool &
]
Generating Code...
Build log was saved at
"file://e:\work\maxregi onborder\maxreg ionborder\maxre gionborder\Debu g\BuildLog.htm"
maxregionborder - 6 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Feb 27 '07 #1
9 4747
fcvcnet wrote:
Hi,
I write a class
class CSegment
{
public:
CSegment(void);
Never write function(void) in C++.
public:
~CSegment(void) ;
public:
CArray< CList< CPoint, CPoint& >, CList< CPoint, CPoint& >& m_curve;
This looks horribly like widows code, so you'd better post to windows
development group

--
Ian Collins.
Feb 27 '07 #2
On Tue, 27 Feb 2007 13:49:22 +0800 in comp.lang.c++, "fcvcnet" <fc*****@163.co mwrote,
>d:\program files\microsoft visual studio 8\vc\atlmfc\inc lude\afxtempl.h (272)
: error C2248: 'CObject::opera tor =' : cannot access private member declared
in class 'CObject'
Your error is happening in a Microsoft header file, in a Microsoft-specific class.

See the welcome message posted twice per week in comp.lang.c++ under the subject "Welcome to comp.lang.c++! Read this first." or available at
http://www.slack.net/~shiva/welcome.txt

Feb 27 '07 #3
yes, I use vs2005 on windows xp.

> CSegment(void);

Never write function(void) in C++.
I use class wizard in vs2005 to write this class. The code is generate by
vs2005.

This looks horribly like widows code, so you'd better post to windows
development group
Yes , it is windows code, but I think it have some relation with c++ .
Do I have to ask in widows group?
what ever thanks you Ian Collins.
Feb 27 '07 #4
Ok, thanks you all.
Now I go to the windows group mfc.
Feb 27 '07 #5
On 27 Feb, 05:49, "fcvcnet" <fcvc...@163.co mwrote:
<...>

Hint,

Try looking up CObject in the VC8 docs. This error is covered there.

"Compiler Errors when Implementing a CObject-Derived Class "

regards
Andy Little

Feb 27 '07 #6
fcvcnet wrote:
yes, I use vs2005 on windows xp.
>>CSegment(void );

Never write function(void) in C++.

I use class wizard in vs2005 to write this class. The code is generate by
vs2005.
I didn't realise it was that bad!
>>This looks horribly like widows code, so you'd better post to windows
development group

Yes , it is windows code, but I think it have some relation with c++ .
Do I have to ask in widows group?
Yes, the problem is somewhere in the bowels of a windows header.

--
Ian Collins.
Feb 27 '07 #7

"Ian Collins" <ia******@hotma il.comwrote in message
news:54******** *****@mid.indiv idual.net...
Never write function(void) in C++.

there is no reason not to do this

Mar 2 '07 #8
Peter wrote:
>
"Ian Collins" <ia******@hotma il.comwrote in message
news:54******** *****@mid.indiv idual.net...
>Never write function(void) in C++.

there is no reason not to do this
Nor is there one to do it.

--
Ian Collins.
Mar 2 '07 #9
Thank you . I have see it.
ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.VisualStudio .v80.en/dv_vccomp/html/9f249b52-aeff-41a1-8a74-a52aa08c4fcf.ht m

"kwikius" <an**@servocomm .freeserve.co.u k>
??????:11****** *************** @s48g2000cws.go oglegroups.com. ..
On 27 Feb, 05:49, "fcvcnet" <fcvc...@163.co mwrote:
<...>

Hint,

Try looking up CObject in the VC8 docs. This error is covered there.

"Compiler Errors when Implementing a CObject-Derived Class "

regards
Andy Little


Mar 2 '07 #10

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

Similar topics

1
2494
by: Koen | last post by:
Hi all, I created a little database to manage my e-books. The program will synchronize a table with the contents of a directory. Works great. Because I keep additional info (like keywords) to the created records in the database and I don't want to lose all that info when I rename a file and synchronise, I've added some code to the program. It works like this: when the filename of a DB records
8
1836
by: MyAlias | last post by:
Can't solve this CallBack returning structures Error message: An unhandled exception of type 'System.NullReferenceException' occurred in MyTest.exe Additional information: Object reference not set to an instance of an object. Situation skeleton: Private Declare Function EnumFontFamiliesASCII Lib "gdi32" Alias
1
2662
by: arun | last post by:
Query is too complex -------------------------------------------------------------------------------- Hi, I was trying to solve this problem since last two days but couldn't find any solution. I wanted to execute a query which is retrieving the records from table1 by checking the condition for a long long string . I'm using where clause and checking the condition as-
2
6656
by: katrinkerber | last post by:
Hello, I need help to solve a runtime error that keeps reocurring every time I try to convert an Excel file into an Acess File. I have looked through many forums trying to find help, but I have almost no specific IT knowledge and so don't really speak the language. Apologies up-ront if I sound dumb. I am working for a company that has a online clothing shop website. All new data of products is always entered into an Excel Spreadsheet and...
4
1633
by: namalapavan | last post by:
hii , i am getting and error while installing oracle9i on RHEL AS 4.0 .i am sure that somebody here would be able to solve my problem.kindly reply so that i can send you the detailed error report. "Error in setting permissions of file/directory" while installing JRE 1.1.8.1.0 Thank you & Have a nice day. namalapavan@gmail.com
17
4087
by: Michael Reichenbach | last post by:
Here is the example code. int main(int argc, char *argv) { string Result; WIN32_FIND_DATA daten; HANDLE h = FindFirstFile(TEXT("c://test"), &daten); system("PAUSE"); return EXIT_SUCCESS; }
3
1997
by: thalinx | last post by:
Hi can ayone help me with this program, cause i dont know how to solve the compiling errors here. thanks # include<stdlib.h> # include<conio.h> # include<stdio.h> # define MAXCADENA 8 # define MAXREN 3 # define MAXCOL 4 int validato(int valor); void ini_renmatdin (int *ap_mat); void ini_colmatdin (int *);
7
89972
by: akmaRudiliyn | last post by:
Hai everybody :). I have problem and need help. ERROR: ERROR Violation of PRIMARY KEY constraint 'PK_Table1_01'. Cannot insert duplicate key in object 'dbo.table1'. ERROR The statement has been terminated. MY QUESTION:
1
20595
by: Ryan Liu | last post by:
Hi, I have a 100 clients/ one server application, use ugly one thread pre client approach. And both side user sync I/O. I frequently see the error on server side(client side code is same, but I don't see the error): "System.IO.IOException: Unable to read data from the transport connection:A blocking operation was interrupted by a call to WSACancelBlockingCall"
0
8050
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
8472
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
8464
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...
0
6805
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6000
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
5471
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3954
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...
0
4015
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2464
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

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.