Click here to Skip to main content
15,903,854 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: license Pin
Tomasz Sowinski15-Oct-02 23:37
Tomasz Sowinski15-Oct-02 23:37 
QuestionHow to export classes in ActiveX project? Pin
denkor15-Oct-02 21:05
denkor15-Oct-02 21:05 
QuestionHow to handle event in DHTML? Pin
sonshiro15-Oct-02 20:54
sonshiro15-Oct-02 20:54 
GeneralStructure Query Pin
Anonymous15-Oct-02 20:45
Anonymous15-Oct-02 20:45 
GeneralRe: Structure Query Pin
Christian Graus15-Oct-02 21:23
protectorChristian Graus15-Oct-02 21:23 
GeneralRe: Structure Query Pin
jhwurmbach15-Oct-02 22:48
jhwurmbach15-Oct-02 22:48 
GeneralIE and SSL question! Pin
wabc15-Oct-02 20:08
wabc15-Oct-02 20:08 
GeneralCArray template class Pin
15-Oct-02 19:14
suss15-Oct-02 19:14 
Hi I had a structure which looks like this:

1.
struct CMyStruct
{
5-6 CString ...;
int ...;
long ...;
1 CStringArray ...;
};

2.
My application is going to generate a lot of instances of CMyStruct; I therefore thought it to be a good idea to use the CArray MFC template class to *manage* my structs. (Adding, deleting etc.)

3.
Accordingly, I put the following definition in my dialog header file.

#include <afxtempl.h>
#include <Mystruct header file>

CArray<CMyStruct,CMyStruct&>MyStructArray;


4. After this I began using it in the following manner:

CMyStruct myStruct;
PopulateMyStruct(&myStruct);//Structure populated
MyStructArray.Add(myStruct);//ERROR PRODUCING LINE


5. On compilation i receive the following error:

\INCLUDE\afxtempl.h(443) : error C2582: 'CMyStruct' : 'operator =' function is unavailable
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\xlocale(467) : while compiling class-template member function 'void __thiscall CArray<struct CMyStruct,struct CMyStruct &>::SetAtGrow(int,struct CMyStruct &)'


6. What could I be doing wrong??

Any help would be greatly appreciated.Unsure | :~ Cry | :((





GeneralRe: CArray template class Pin
Pavel Klocek15-Oct-02 19:29
Pavel Klocek15-Oct-02 19:29 
GeneralRe: CArray template class Pin
Chris Losinger15-Oct-02 19:29
professionalChris Losinger15-Oct-02 19:29 
GeneralRe: CArray template class Pin
Richard Lewis15-Oct-02 19:56
Richard Lewis15-Oct-02 19:56 
GeneralRe: CArray template class Pin
Holger Persch15-Oct-02 20:01
Holger Persch15-Oct-02 20:01 
GeneralRe: CArray template class Pin
Richard Lewis15-Oct-02 20:24
Richard Lewis15-Oct-02 20:24 
GeneralRe: CArray template class Pin
Chris Losinger15-Oct-02 20:25
professionalChris Losinger15-Oct-02 20:25 
GeneralRe: CArray template class Pin
Richard Lewis15-Oct-02 20:33
Richard Lewis15-Oct-02 20:33 
GeneralRe: CArray template class Pin
Christian Graus15-Oct-02 21:25
protectorChristian Graus15-Oct-02 21:25 
GeneralRe: CArray template class Pin
Holger Persch15-Oct-02 20:37
Holger Persch15-Oct-02 20:37 
GeneralRe: CArray template class Pin
Richard Lewis15-Oct-02 20:47
Richard Lewis15-Oct-02 20:47 
GeneralRe: CArray template class Pin
Tomasz Sowinski15-Oct-02 23:52
Tomasz Sowinski15-Oct-02 23:52 
GeneralRe: CArray template class Pin
Holger Persch16-Oct-02 3:23
Holger Persch16-Oct-02 3:23 
GeneralPreTranslateMessage Pin
paulb15-Oct-02 14:06
paulb15-Oct-02 14:06 
GeneralRe: PreTranslateMessage Pin
PJ Arends15-Oct-02 14:35
professionalPJ Arends15-Oct-02 14:35 
GeneralRe: PreTranslateMessage Pin
paulb15-Oct-02 14:53
paulb15-Oct-02 14:53 
GeneralRe: PreTranslateMessage Pin
Michael Dunn15-Oct-02 19:38
sitebuilderMichael Dunn15-Oct-02 19:38 
GeneralHelp needed! Pin
MFC is the Best15-Oct-02 12:19
MFC is the Best15-Oct-02 12:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.