faq CArray member function Add problem

Hi,
   Headcke!
   I define some classes as fellows:
CMyPoint
{
....
	CMyPoint(const long &xx, const long &yy);
	CMyPoint(const CMyPoint &cmpt);
	CMyPoint(const CPoint &cpt);
	CMyPoint& operator = (const CMyPoint &assmypt);
	CMyPoint& operator = (const CPoint &asspt);
....
};

CSegment
{
....
CList<CMyPoint,CMyPoint> m_PointList;
....
CSegment& operator = (const CSegment& asssignsegmet);
....
};

But when I use them

	CArray<CSegment,CSegment> tmpmyarray;
	CSegment tmpsegment;
	tmpsegment.m_PointList.RemoveAll();
	tmpsegment.m_nIndex=0;
	tmpsegment.m_bIsVisited=false;
	tmpsegment.m_bCreatDirection=true;
	tmpsegment.m_nSegmentTotalNumber=0;
	tmpmyarray.Add(tmpsegment); <-- remove this compile ok!

the compile output

------ Build started: Project: maxborder, Configuration: Debug Win32 ------
Compiling...
maxborder.cpp
maxborderView.cpp
c:\program files\microsoft visual studio
8\vc\atlmfc\include\afxtempl.h(781) : error C2248: 'CObject::CObject' :
cannot

access private member declared in class 'CObject'
        c:\program files\microsoft visual studio
8\vc\atlmfc\include\afx.h(553) : see declaration of 'CObject::CObject'
        c:\program files\microsoft visual studio
8\vc\atlmfc\include\afx.h(524) : see declaration of 'CObject'
        This diagnostic occurred in the compiler generated function
'CList<TYPE,ARG_TYPE>::CList(const CList<TYPE,ARG_TYPE>

&)'
        with
        [
            TYPE=CMyPoint,
            ARG_TYPE=CMyPoint
        ]
Segment.cpp
Generating Code...
Build log was saved at "file://c:\Documents and Settings\fc\����\
borderlast\maxborder\maxborder\Debug\BuildLog.htm"
maxborder - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

What is wrong with my code? Help me!
Thanks a lot.
0
fcvcnet
3/20/2007 3:10:08 PM
vc.mfc 33608 articles. 0 followers. Follow

16 Replies
1283 Views

Similar Articles

[PageSpeed] 16

1. Give your CPoint and CSegment class default constructors.
2. Change the second parameter of your CArray and CList declerations to 
referenses
CArray<CSegment,CSegment &> tmpmyarray;

AliR.


"fcvcnet" <fcvcnet@163.com> wrote in message 
news:etp106$h59$1@news.cn99.com...
>
> Hi,
>   Headcke!
>   I define some classes as fellows:
> CMyPoint
> {
> ...
> CMyPoint(const long &xx, const long &yy);
> CMyPoint(const CMyPoint &cmpt);
> CMyPoint(const CPoint &cpt);
> CMyPoint& operator = (const CMyPoint &assmypt);
> CMyPoint& operator = (const CPoint &asspt);
> ...
> };
>
> CSegment
> {
> ...
> CList<CMyPoint,CMyPoint> m_PointList;
> ...
> CSegment& operator = (const CSegment& asssignsegmet);
> ...
> };
>
> But when I use them
>
> CArray<CSegment,CSegment> tmpmyarray;
> CSegment tmpsegment;
> tmpsegment.m_PointList.RemoveAll();
> tmpsegment.m_nIndex=0;
> tmpsegment.m_bIsVisited=false;
> tmpsegment.m_bCreatDirection=true;
> tmpsegment.m_nSegmentTotalNumber=0;
> tmpmyarray.Add(tmpsegment); <-- remove this compile ok!
>
> the compile output
>
> ------ Build started: Project: maxborder, Configuration: Debug 
> Win32 ------
> Compiling...
> maxborder.cpp
> maxborderView.cpp
> c:\program files\microsoft visual studio
> 8\vc\atlmfc\include\afxtempl.h(781) : error C2248: 'CObject::CObject' :
> cannot
>
> access private member declared in class 'CObject'
>        c:\program files\microsoft visual studio
> 8\vc\atlmfc\include\afx.h(553) : see declaration of 'CObject::CObject'
>        c:\program files\microsoft visual studio
> 8\vc\atlmfc\include\afx.h(524) : see declaration of 'CObject'
>        This diagnostic occurred in the compiler generated function
> 'CList<TYPE,ARG_TYPE>::CList(const CList<TYPE,ARG_TYPE>
>
> &)'
>        with
>        [
>            TYPE=CMyPoint,
>            ARG_TYPE=CMyPoint
>        ]
> Segment.cpp
> Generating Code...
> Build log was saved at "file://c:\Documents and Settings\fc\����\
> borderlast\maxborder\maxborder\Debug\BuildLog.htm"
> maxborder - 1 error(s), 0 warning(s)
> ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped 
> ==========
>
> What is wrong with my code? Help me!
> Thanks a lot. 


0
AliR3470 (3235)
3/20/2007 3:19:01 PM
AliR (VC++ MVP) �:
> 1. Give your CPoint and CSegment class default constructors.
> 2. Change the second parameter of your CArray and CList declerations to 
> referenses
> CArray<CSegment,CSegment &> tmpmyarray;
> 
> AliR.
> 
> 
> "fcvcnet" <fcvcnet@163.com> wrote in message 
> news:etp106$h59$1@news.cn99.com...
>> Hi,
>>   Headcke!
>>   I define some classes as fellows:
>> CMyPoint
>> {
>> ...
>> CMyPoint(const long &xx, const long &yy);
>> CMyPoint(const CMyPoint &cmpt);
>> CMyPoint(const CPoint &cpt);
>> CMyPoint& operator = (const CMyPoint &assmypt);
>> CMyPoint& operator = (const CPoint &asspt);
>> ...
>> };
>>
>> CSegment
>> {
>> ...
>> CList<CMyPoint,CMyPoint> m_PointList;
>> ...
>> CSegment& operator = (const CSegment& asssignsegmet);
>> ...
>> };
>>
>> But when I use them
>>
>> CArray<CSegment,CSegment> tmpmyarray;
>> CSegment tmpsegment;
>> tmpsegment.m_PointList.RemoveAll();
>> tmpsegment.m_nIndex=0;
>> tmpsegment.m_bIsVisited=false;
>> tmpsegment.m_bCreatDirection=true;
>> tmpsegment.m_nSegmentTotalNumber=0;
>> tmpmyarray.Add(tmpsegment); <-- remove this compile ok!
>>
>> the compile output
>>
>> ------ Build started: Project: maxborder, Configuration: Debug 
>> Win32 ------
>> Compiling...
>> maxborder.cpp
>> maxborderView.cpp
>> c:\program files\microsoft visual studio
>> 8\vc\atlmfc\include\afxtempl.h(781) : error C2248: 'CObject::CObject' :
>> cannot
>>
>> access private member declared in class 'CObject'
>>        c:\program files\microsoft visual studio
>> 8\vc\atlmfc\include\afx.h(553) : see declaration of 'CObject::CObject'
>>        c:\program files\microsoft visual studio
>> 8\vc\atlmfc\include\afx.h(524) : see declaration of 'CObject'
>>        This diagnostic occurred in the compiler generated function
>> 'CList<TYPE,ARG_TYPE>::CList(const CList<TYPE,ARG_TYPE>
>>
>> &)'
>>        with
>>        [
>>            TYPE=CMyPoint,
>>            ARG_TYPE=CMyPoint
>>        ]
>> Segment.cpp
>> Generating Code...
>> Build log was saved at "file://c:\Documents and Settings\fc\����\
>> borderlast\maxborder\maxborder\Debug\BuildLog.htm"
>> maxborder - 1 error(s), 0 warning(s)
>> ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped 
>> ==========
>>
>> What is wrong with my code? Help me!
>> Thanks a lot. 
> 
> 
Thank you.
I just define a constructor
CSegment::CSegment(const CSegment& assignsegment)
the problem is gone.

And can you tell me , is the second parameter stand for the way we pass
the value to it? I use CList , but I feel something I still do not know
clearly.
Thank you.
0
fcvcnet
3/20/2007 3:32:14 PM
for value type of bool , is it correct ?
CArray <BOOL,BOOL&>
and what is the difference between the two:
CArray<CPoint,CPoint&> ptArray;
CArray<CPoint,CPoint> &ptArray;
Thanks a lot.
0
fcvcnet
3/20/2007 3:44:24 PM
If you look at the declearation of CList or CArray you will see

template<class TYPE, class ARG_TYPE = const TYPE &>

So anywhere the class uses ARG_TYPE as the parameter type then it will be 
passing whatever type you passed as the second parameter to the CList class.

if you were to declare your array variable like this
CArray <CPoint> MyPointArray; //then the second paramter is of type CPoint & 
by default
CArray <CPoint,CPoint> MyPointArray; //now you have changed the type from 
CPoint & to CPoint

AliR.


> Thank you.
> I just define a constructor
> CSegment::CSegment(const CSegment& assignsegment)
> the problem is gone.
>
> And can you tell me , is the second parameter stand for the way we pass
> the value to it? I use CList , but I feel something I still do not know
> clearly.
> Thank you. 


0
AliR3470 (3235)
3/20/2007 3:47:53 PM
> CArray<CPoint,CPoint&> ptArray;
This is an array of CPoints
> CArray<CPoint,CPoint> &ptArray;
This is a reference to an array of CPoints with the second parameter changed 
from CPoint & to CPoint.

One reason the second parameter of CArray and CList is a reference is that 
if the type for the array is really large it won't be passed on the stack as 
a value paramter, it would get passed as reference therefore save time and 
space.

AliR.




"fcvcnet" <fcvcnet@163.com> wrote in message 
news:etp30e$i6f$1@news.cn99.com...
>
> for value type of bool , is it correct ?
> CArray <BOOL,BOOL&>
> and what is the difference between the two:
> CArray<CPoint,CPoint&> ptArray;
> CArray<CPoint,CPoint> &ptArray;
> Thanks a lot. 


0
AliR3470 (3235)
3/20/2007 3:50:24 PM
Thanks.
0
fcvcnet
3/20/2007 3:56:44 PM
AliR (VC++ MVP) �:
>> CArray<CPoint,CPoint&> ptArray;
> This is an array of CPoints
>> CArray<CPoint,CPoint> &ptArray;
> This is a reference to an array of CPoints with the second parameter changed 
> from CPoint & to CPoint.
> 
> One reason the second parameter of CArray and CList is a reference is that 
> if the type for the array is really large it won't be passed on the stack as 
> a value paramter, it would get passed as reference therefore save time and 
> space.
> 
> AliR.
> 
> 
> 
> 
> "fcvcnet" <fcvcnet@163.com> wrote in message 
> news:etp30e$i6f$1@news.cn99.com...
>> for value type of bool , is it correct ?
>> CArray <BOOL,BOOL&>
>> and what is the difference between the two:
>> CArray<CPoint,CPoint&> ptArray;
>> CArray<CPoint,CPoint> &ptArray;
>> Thanks a lot. 
> 
> 
I see. Thank you very much. Good night.
0
fcvcnet
3/20/2007 3:59:50 PM
Hi,
   I defined
   CArray<bool,bool&> arrayderiction;
   when I use it
   arraydirection.Add(m_bDirection);<-- the tip shows CArray<int,int&>
when finished compile.
   but when I compile
   error
   ...
    : error C2664: 'CArray<TYPE,ARG_TYPE>::Add' : cannot convert
parameter 1 from 'bool' to 'int &'
        with
        [
            TYPE=int,
            ARG_TYPE=int &
        ]
Generating Code...
	 then I changed
   CArray<bool,bool&> arrayderiction; <-- the tip shows CArray<int,int&>
when finished compile.
   to
   CArray<bool,bool> arrayderiction;
   it is compiled ok.
   Why?
0
fcvcnet
3/21/2007 2:24:42 AM
I don't see any difference between your two declarations. Am I missing 
something?

>   CArray<bool,bool&> arrayderiction;

>   CArray<bool,bool&> arrayderiction; <-- the tip shows CArray<int,int&>

AliR.

"fcvcnet" <fcvcnet@163.com> wrote in message 
news:etq8h6$14k$1@news.cn99.com...
> Hi,
>   I defined
>   CArray<bool,bool&> arrayderiction;
>   when I use it
>   arraydirection.Add(m_bDirection);<-- the tip shows CArray<int,int&>
> when finished compile.
>   but when I compile
>   error
>   ...
>    : error C2664: 'CArray<TYPE,ARG_TYPE>::Add' : cannot convert
> parameter 1 from 'bool' to 'int &'
>        with
>        [
>            TYPE=int,
>            ARG_TYPE=int &
>        ]
> Generating Code...
> then I changed
>   CArray<bool,bool&> arrayderiction; <-- the tip shows CArray<int,int&>
> when finished compile.
>   to
>   CArray<bool,bool> arrayderiction;
>   it is compiled ok.
>   Why? 


0
AliR3470 (3235)
3/21/2007 2:51:59 PM
Hello, AliR (VC++ MVP)

	CArray<bool,bool&> arrayderiction; <-- the tip shows CArray<int,int&>
compile error. It seems that the compile deal with it as CArray<int,int&>.



	CArray<bool,bool> arrayderiction;

this one do not have & after bool and it compile ok.
0
fcvcnet
3/23/2007 2:20:53 AM
I can't reproduce your problem with VS 2003.  Which version are you using?

AliR.

"fcvcnet" <fcvcnet@163.com> wrote in message 
news:etvh2q$lch$1@news.cn99.com...
> Hello, AliR (VC++ MVP)
>
> CArray<bool,bool&> arrayderiction; <-- the tip shows CArray<int,int&>
> compile error. It seems that the compile deal with it as CArray<int,int&>.
>
>
>
> CArray<bool,bool> arrayderiction;
>
> this one do not have & after bool and it compile ok. 


0
AliR3470 (3235)
3/23/2007 3:25:10 PM
fcvcnet wrote:
> for value type of bool , is it correct ?
> CArray <BOOL,BOOL&>
> and what is the difference between the two:
> CArray<CPoint,CPoint&> ptArray;
> CArray<CPoint,CPoint> &ptArray;
> Thanks a lot.

fvcnet:

IMHO the second argument to CArray and (likewise) CList is a major 
source of confusion, and is one of the many design errors of the MFC 
collection classes. In recent versions of MFC the ARG_TYPE argument of 
CArray and CList is defaulted to const TYPE&, which it what it always 
should have been. Unfortunately this cannot be done for CMap, because 
the argumentes are in the "wrong" order to allow defaulting.

Much better to use the C++ standard library containers. No confusing 
double argument, and they are copy-able, which allows arrays of arrays 
and the like without jumping through hoops.

David Wilkinson

====================
0
no-reply8010 (1790)
3/23/2007 4:24:03 PM
AliR (VC++ MVP) �:
> I can't reproduce your problem with VS 2003.  Which version are you using?
> 
> AliR.
> 
> "fcvcnet" <fcvcnet@163.com> wrote in message 
> news:etvh2q$lch$1@news.cn99.com...
>> Hello, AliR (VC++ MVP)
>>
>> CArray<bool,bool&> arrayderiction; <-- the tip shows CArray<int,int&>
>> compile error. It seems that the compile deal with it as CArray<int,int&>.
>>
>>
>>
>> CArray<bool,bool> arrayderiction;
>>
>> this one do not have & after bool and it compile ok. 
> 
> 
Thank you AliR .
I am useing vs2005 professional edition + windows xp professional.

First, I compiled the project and it says ok.
------ Build started: Project: maxborder, Configuration: Debug Win32 ------
Compiling...
maxborderView.cpp
Generating Code...
Skipping... (no relevant changes detected)
maxborder.cpp
Linking...
Embedding manifest...
Build log was saved at "file://e:\border\Debug\BuildLog.htm"
maxborder - 0 error(s), 0 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========


and then I have recurred the problem :

change
bool CmaxborderView::MaxBorder(CArray<CSegment, CSegment&> insegmentlist,
							   CArray<CSegment, CSegment&> outsegmentlist,
							   CArray <int,int&> arrayIndex,
							   CArray <BOOL,BOOL> arrayDirection
							   )

to
bool CmaxborderView::MaxBorder(CArray<CSegment, CSegment&> insegmentlist,
							   CArray<CSegment, CSegment&> outsegmentlist,
							   CArray <int,int&> arrayIndex,
							   CArray <BOOL,BOOL&> arrayDirection
							   )

and paste the compile output as follows:
------ Build started: Project: maxborder, Configuration: Debug Win32 ------
Compiling...
maxborderView.cpp
e:\border\maxborderview.cpp(443) : error C2664:
'CArray<TYPE,ARG_TYPE>::Add' : cannot convert parameter 1 from 'bool' to
'int &'
        with
        [
            TYPE=int,
            ARG_TYPE=int &
        ]
Generating Code...
Compiling...
maxborder.cpp
Generating Code...
Build log was saved at "file://e:\border\Debug\BuildLog.htm"
maxborder - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

0
fcvcnet
3/26/2007 2:01:10 AM
David Wilkinson 写道:
> fcvcnet wrote:
>> for value type of bool , is it correct ?
>> CArray <BOOL,BOOL&>
>> and what is the difference between the two:
>> CArray<CPoint,CPoint&> ptArray;
>> CArray<CPoint,CPoint> &ptArray;
>> Thanks a lot.
> 
> fvcnet:
> 
> IMHO the second argument to CArray and (likewise) CList is a major 
> source of confusion, and is one of the many design errors of the MFC 
> collection classes. In recent versions of MFC the ARG_TYPE argument of 
> CArray and CList is defaulted to const TYPE&, which it what it always 
> should have been. Unfortunately this cannot be done for CMap, because 
> the argumentes are in the "wrong" order to allow defaulting.
> 
> Much better to use the C++ standard library containers. No confusing 
> double argument, and they are copy-able, which allows arrays of arrays 
> and the like without jumping through hoops.
> 
> David Wilkinson
> 
> ====================
Thank you David Wilkinson.
   Before this mfc project, I used the STL, but I met some problem that 
I  can not resolve. It is something about vector. I use the default 
vector size and when I insert the new element, it fails. I find some 
stuff online. Some says that the iterator will be invalide when the 
container do something new allocating more storage.
0
fcvcnet
3/26/2007 2:39:27 AM
What at line 443 of e:\border\maxborderview.cpp?  That's what it is 
complaining about.

I think your problem is mixing bool and BOOL.  bool  is an actual built-in 
type that can have the values true and false (notice the lower case of both 
type and values).

BOOL on the other hand is a microsoft madeup type.  typedef int BOOL. So a 
BOOL is actually an int.  and can have any value that can fit into an it. 
including TRUE and FALSE (also notice that these are uppercase).

so you will get an error if you try to do this.
CArray<BOOL,BOOL&> MyBoolArray;

MyBoolArray.Add(true); //This will cause an error
MyBoolArray.Add(TRUE); // this is ok

//////////////////
CArray<bool,bool&> MyBoolArray;

MyBoolArray.Add(true); //This is ok
MyBoolArray.Add(TRUE); // this will cause an error

Here is another tip. If you your second type for the CArray or CList is just 
the reference of the first type, then you can simply leave it out, and it 
will default to that.

CArray<int> is the same as CArray<int,int&>

AliR.

AliR.

"fcvcnet" <fcvcnet@163.com> wrote in message 
news:eu7d2r$ert$1@news.cn99.com...
> AliR (VC++ MVP) �:
>> I can't reproduce your problem with VS 2003.  Which version are you 
>> using?
>>
>> AliR.
>>
>> "fcvcnet" <fcvcnet@163.com> wrote in message
>> news:etvh2q$lch$1@news.cn99.com...
>>> Hello, AliR (VC++ MVP)
>>>
>>> CArray<bool,bool&> arrayderiction; <-- the tip shows CArray<int,int&>
>>> compile error. It seems that the compile deal with it as 
>>> CArray<int,int&>.
>>>
>>>
>>>
>>> CArray<bool,bool> arrayderiction;
>>>
>>> this one do not have & after bool and it compile ok.
>>
>>
> Thank you AliR .
> I am useing vs2005 professional edition + windows xp professional.
>
> First, I compiled the project and it says ok.
> ------ Build started: Project: maxborder, Configuration: Debug 
> Win32 ------
> Compiling...
> maxborderView.cpp
> Generating Code...
> Skipping... (no relevant changes detected)
> maxborder.cpp
> Linking...
> Embedding manifest...
> Build log was saved at "file://e:\border\Debug\BuildLog.htm"
> maxborder - 0 error(s), 0 warning(s)
> ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped 
> ==========
>
>
> and then I have recurred the problem :
>
> change
> bool CmaxborderView::MaxBorder(CArray<CSegment, CSegment&> insegmentlist,
>    CArray<CSegment, CSegment&> outsegmentlist,
>    CArray <int,int&> arrayIndex,
>    CArray <BOOL,BOOL> arrayDirection
>    )
>
> to
> bool CmaxborderView::MaxBorder(CArray<CSegment, CSegment&> insegmentlist,
>    CArray<CSegment, CSegment&> outsegmentlist,
>    CArray <int,int&> arrayIndex,
>    CArray <BOOL,BOOL&> arrayDirection
>    )
>
> and paste the compile output as follows:
> ------ Build started: Project: maxborder, Configuration: Debug 
> Win32 ------
> Compiling...
> maxborderView.cpp
> e:\border\maxborderview.cpp(443) : error C2664:
> 'CArray<TYPE,ARG_TYPE>::Add' : cannot convert parameter 1 from 'bool' to
> 'int &'
>        with
>        [
>            TYPE=int,
>            ARG_TYPE=int &
>        ]
> Generating Code...
> Compiling...
> maxborder.cpp
> Generating Code...
> Build log was saved at "file://e:\border\Debug\BuildLog.htm"
> maxborder - 1 error(s), 0 warning(s)
> ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped 
> ==========
> 


0
AliR3470 (3235)
3/26/2007 3:25:59 PM
AliR (VC++ MVP) �:

> I think your problem is mixing bool and BOOL.  bool  is an actual built-in 
> type that can have the values true and false (notice the lower case of both 
> type and values).
> 
> BOOL on the other hand is a microsoft madeup type.  typedef int BOOL. So a 
> BOOL is actually an int.  and can have any value that can fit into an it. 
> including TRUE and FALSE (also notice that these are uppercase).
> 
> so you will get an error if you try to do this.
> CArray<BOOL,BOOL&> MyBoolArray;
> 
> MyBoolArray.Add(true); //This will cause an error
> MyBoolArray.Add(TRUE); // this is ok
> 
> //////////////////
> CArray<bool,bool&> MyBoolArray;
> 
> MyBoolArray.Add(true); //This is ok
> MyBoolArray.Add(TRUE); // this will cause an error

I know now. Thank you very much. I do some try. And the compiler
complaining this:
MyBoolArray.Add(TRUE);
error C2664: 'Add' : cannot convert parameter 1 from 'const int' to 'int &'
That means reference just for lvalue not for rvalue , am I right?
int a=5;
int& b=a;
int& c=5; <-- this is error.

> Here is another tip. If you your second type for the CArray or CList is just 
> the reference of the first type, then you can simply leave it out, and it 
> will default to that.
> 
> CArray<int> is the same as CArray<int,int&>

Thanks I know now.
I tried. Creat a new single document project and add a myintarray to CFFView
CArray<int> myintarray;
the compiler complaining :
--------------------Configuration: ff - Win32 Debug--------------------
Compiling...
ff.cpp
c:\samples\vc98\mfc\advanced\ff\ffview.h(24) : error C2976: 'CArray' :
too few template arguments
        c:\program files\microsoft visual
studio\vc98\mfc\include\afxtempl.h(238) : see declaration of 'CArray'
c:\samples\vc98\mfc\advanced\ff\ffview.h(24) : error C2079: 'myintarray'
uses undefined class 'CArray<int>'
ffView.cpp
c:\samples\vc98\mfc\advanced\ff\ffview.h(24) : error C2976: 'CArray' :
too few template arguments
        c:\program files\microsoft visual
studio\vc98\mfc\include\afxtempl.h(238) : see declaration of 'CArray'
c:\samples\vc98\mfc\advanced\ff\ffview.h(24) : error C2079: 'myintarray'
uses undefined class 'CArray<int>'
Generating Code...
Error executing cl.exe.

ff.exe - 4 error(s), 0 warning(s)

I am use visual c++ 6.0 enterprise + windows xp .

And another tip. Is that your posts previous is called top-post? I just
know what is top-post and I correcte. ;)

Last, thanks you all very much.

0
fcvcnet
3/27/2007 1:24:40 AM
Reply:

Similar Artilces:

WLM has a folder problem....
As I said before, I upgraded my wife's laptop from Vista to W7. Now she hates windows live mail because her folders are gone, and the folder concept apparently does not exist. Is Microsoft crazy? Why change something that works? I guess I'll put Windows Mail on her W7 laptop - I have it on a backup USB drive. Unless someone can suggest how to get her old folders with all of her hundreds of "sorted into folders and saved" emails into WLM. TIA, Paul How to Import Windows Mail Messages into Windows Live Mail http://www.sevenforums.com/tutorials/3798-window...

Data Validation problem #5
hi I think that is a different solution entirely - in that example yo gave me it is a simple case of choosing one list and that then sets th range for list 2, however the second set of lists are all individual my requirement is that the validation picks the required items out o just ONE list, whereas in the example you needed to maintain individua lists each of which was dependant on the first selection -- moosife ----------------------------------------------------------------------- moosifer's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1590 View this threa...

Need help finding the right function, please
The cells in Col A contain one of four values. The cells in Col D contain dates. I want to return the highest date for each of the four values. I'm having a difficult time understanding how the different look up functions work to allow me to get =(MAX(all dates in Cold D where Col A = "x")). The Help files for both LOOKUP and VLOOKUP indicate the values in the column to be searched must be sorted in ascending order. That can't happen in this sheet. I'm stuck with them as they are. A drop-kick in the right direction would be much appreciated!! Ed Try =MAX(IF(A1:A...

Stock Quotes (FAQ?)
Interested in pulling in end-of-day stock qoutes for 15 - 20 stocks. I used to use the MSN Money Central add in, but it is apparently is no longer available. I'd like to be able to code it myself, (or at least be able to browse the source) but I need to get pointed in the right direction. Maybe in a FAQ list somewhere? Thanks in advance for any input/suggestions, JA If you Google "yahoo stock data excel" you will find lots of links to do what you want. A few years back I modified a Yahoo USA file to download stock data (20 min delay) from the Yahoo Australian site ...

Data Migration Framework problems
Hi, Sorry to post this again, but I've been looking all over trying to solve this problem but no luck. I'm trying to migrate some data (Accounts, Contacts and Activities) to MS CRM 3.0 using the Data Migration Framework. I succeeded in migrating the Accounts and Contacts and just over 600 out of about 7000 activities (the activities are simple tasks associated with the accounts). I noticed that all the non-migrated activities have status set to "Completed". Moreover, when I change the status of those records to "In Progress" (just to test) some of them succeed. Doe...

how to add or remove entity to a xml file
could someone tell me how to add or remove entity to a xml file when i dim xmlentity as new xmlentity it's say it's sube new is private thks "terry" <terry@discussions.microsoft.com> wrote in message news:DA844CFA-2EFD-4E9A-86FC-13CC909201E6@microsoft.com... > could someone tell me how to add or remove entity to a xml file XmlEntity can't be directly instantiated, you have to work through the InternalSubset of the DTD (as represented by the XmlDocumentType class). When you specify the InternalSubset for an XmlDocumentType object that you can create through a...

Any way to get worksheet name from function?
Is there any way for me to access the name of the current Worksheet tab, to put it into a cell? I need a cell whose name changes based on the name entered on the Worksheet tab. Thanks, Colin Copied from Bob Phillips' site........note: leave the "filename" as is. Do not substitute your file name. File path, file and worksheet name: =CELL("filename",A1) File path only: =LEFT(CELL("filename",A1),FIND("[",CELL("filename",A1),1)-1) File name only: =MID(CELL("filename",A1),FIND("[",CELL("filename",A1),1)+...

Using Dispatcher.BeginInvoke with current foreach member
I tried code below but assertion fails since col value has changed . How to fix this code so that BeginInvoke is called with definition time col value in for loop ? Andrus. partial class MyUserControl : UserControl public CreateFields() { foreach (FormField col in MyFields ) { if (col.Andmeklass == "Kiirvalik") { Dispatcher.BeginInvoke(() => { Debug.Assert(col.Andmeklass == "Kiirvalik"); col.LoadPickListToCacheAsync(); }); } } } } Andrus wrote: > I tried code bel...

faq
Hi, There is RoundRect() function in mfc. Now I want to combine 3 rect into one region, it becomes to a polygon. Is there have RoundPolygon() function? Surely its inner corner shoulde be draw round too. So far as I know there is no built in command for that, but you could build your own using a series of other available commands. This article sort of does that: http://www.tek-tips.com/faqs.cfm?fid=1400 http://www.codeproject.com/system/remoteprogramexec.asp Tom "fcvcnet" <fcvcnet@163.com> wrote in message news:uJGW8sJVGHA.5468@TK2MSFTNGP14.phx.gbl... > Hi, >...

Outlook crmaddin often does not function 01-24-07
Hello, In one of my installations, users need to remove and add the crmaddin quite often at their outlook clients. Most of them have the desktop version. Do you know if there is a hotfix/patch available that makes the crmaddin more stable? Can you advise? Thank you, Elena ...

Excel 2003 vsto 2005 vb.net
Hello, I have an add-in that works well and executes the me.startup event perfectly when Excel is started manually. If Excel is started by double clicking an .xls file, the add-in fails to start and becomes disabled. The xls file then loads. I can re-enable the add-in and it executes me.starup fine. I found that when I strip much code back in me.startup the add-in can start sucessfully when double clicking an .xls file to open Excel. There does not appear to be any 'offending code' that causes the problem, it appears to be more along the line of timing. Thank...

Formula for a Check Register function
Hi everyone, I'm not sure if this is the right place to ask thi question but im trying to use Excel as my check register but i can figure out what formula I need to use so that it will calculate an place the balance at the end of each row. Any suggestions would b greatly appreciated. Thanks in advance! Ric -- RAA8 ----------------------------------------------------------------------- RAA81's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1638 View this thread: http://www.excelforum.com/showthread.php?threadid=27756 Hi you may provide some more detail abou...

Problems receiving email through a network
I have 2 computers on a network, both running win xp pro. I have just set the client pc up to send and receive emails through outlook xp, but it won't work. I can browse the internet fine on the client pc, and everything else is working, I just can't log onto the pop & smtp servers through it. Reported error is: (0x80042108) Any ideas would be very much appreciated :) Thanks ...

faq initialize CList
Hi, I have a member viarable of CList<CPoint,CPoint&> m_pointlist in Class Segment. Should I have to initialize the m_pointlist in Segment constructur? Thanks. The CList has a constructor with a default parameter (block size = 10). If that number satisfies you, you do not need to worry about initialization. Otherwise, follow this syntax: class Segment { private: CList<CPoint, CPoint&> m_pointList; public: Segment() : m_pointList( 100 ) // Place your own number instead of 100... { } } or class Segment { private: CList<CPoint, CPoint&> m_point...

Using SumProduct function in VBA
I'd appreciate some help in using the sumproduct function. I have a set of numbers in cells a1 through to j1, then a table of numbers starting in cell a3 and going across and down to cell j100. In cell k3, I need to put the function =SUMPRODUCT(A$1:J$1,A3:J3) then copy this down the column. I'd like to put it into a for/next loop as the start and end row will vary. I'd also like column k to show values rather than contain formulas. Thanks for any help. Colin Hi, Try this : '--------------------------------------- Sub Formula() Dim LastRow As Long...

FAQ
Hello, Is there a faq for this group or other document that outlines the type of questions that are normally posted. Danzer I wish! Unfortunately, there is not a FAQ for this newsgroup. Nor are there sticky threads. Worst of all they purge the old messages after about 90 days... To get more history, and IMO better searching, you can search this group through Google Groups. Google has history going back to at least 2003... Glenn Adams Tiber Creek Consulting http://www.tibercreek.com glenn@tibercreek.com ---------------------------------------------- Please DO NOT respond to me d...

command line
How do I do this? I need to set up some command line scripts to install printers for Ghostscript. I'm tired of doing it manually on every machine. For my needs I need a local port called "C:\Program Files\gs\output\tfile.ps" Please don't bother me with a bunch of "why"s. It's what I need for this. The following runs great if the port already exists. rundll32 printui.dll,PrintUIEntry /if /f "C:\Program Files\gs\gs8.64\lib\ghostpdf.inf" /r "c:\Program Files\gs\output\tfile.ps" /m "Ghostscript PDF" /b "Ghostscr...

Problem with SessionClass setting to Nothing
Hi, I have a TenderEnd hook registered for my RMS. I am getting a reference of SessionClass object through the Process function. But later in my code, the SessionClass object is automatically getting set to Nothing. So one of my call is failing and the Err.Description is "Invalid Procedure call or argument". Is there any chance that a SessionClass reference can get set to "Nothing". Is there any Timeout for SessionClass. Public Function Process(objSession As Object) On Error GoTo ERR_HANDLER: // All my code goes here // The following call fails because objSession is g...

Splitter Window + TreeView + ListView + Dialog problem from Newbie
Hello ... :) I'm a MFC newbie. (Sorry that I'm not English native speaker.) I'm programming in Visual .NET MFC. I'm using SDI with Splitter window and I implemented as the following. IMPLEMENT_DYNCREATE(CLeftFrame, CTreeView) IMPLEMENT_DYNCREATE(CRightFrame, CListView) What I want it to be is ...... 1. When the program run, the left frame will show one icon. 2. After click the icon on the left frame, the popup menu will be shown. 3. After right click in the popup menu, the dialog will be shown for setting something. 4. After finish setting, the new icon on the right frame ...

Excel worksheet function
Can I protect my worksheet in Excel and enable the spell function... Only by using VBA macro code. Requires VBA to unprotect the sheet, do the spellcheck then reprotect the sheet. Similar to....... Sub Spell_Check() ActiveSheet.Unprotect Password:="justme" Cells.CheckSpelling SpellLang:=1033 ActiveSheet.Protect Password:="justme", DrawingObjects:=True, _ Contents:=True, Scenarios:=True End Sub If not familiar with VBA and macros, see David McRitchie's site for more on "getting started". http://www.mvps.org/dmcritchie/excel/getstar...

Outlook XP Attachment Problem
Hi One of my users is just unable to receive attachments over 20 megs or so in size for some unknown reason. Outlook sits for 6-7 minutes downloading the message+attachment, then just shows the message as having no attachment in his inbox. Things I've verified: PST is well under limit, @ 800 megs or so User receives attachments under 20 megs just fine (Tried 7/10/18 meg attachments) The attachments ARE on the email server, I downloaded them to my laptop no problem. Have run most recent office updates. Have tried reinstalling office entirely Have run detect/repair Attachments are not blo...

Hyperlink created in Access does not function when printed to pdf
I have a database in Access 2007 in which I created a field that hyperlinks to Google Maps for an office location. In Access database, the hyperlink works perfectly. When I print the report to Adobe PDF, the link cannot be accessed. I have a similar field that opens our e-mail program and generates an e-mail. THAT works, but the hyperlink does not. I hope this makes sense. Thanks in advance. You could use a different pdf printer driver. For example win2pdf will take any text that looks like a hyperlink and change it to an actual hyperlink in the pdf file. I assume t...

Problem printing a bitmap
I'm attempting to print a page of labels from a dialog printing a logo on each label along with some text. The bitmap for the logo is much larger than I need so I use StretchBlt to shrink it to size for printing. This worked fine thru much of my testing but now it no longer prints the logo for some reason and I can't seem to figure out why. Prior to beginning the label print I load the bitmap with the following code: bResult = m_cBitmapLogo.LoadBitmap (IDB_LOGO_1); m_cBitmapLogo.GetBitmap (&m_bmLogo); Then a function is called from within a loop to print each label. The ...

Hide Member Name
HI My name is syed ali servaral times u all peoples help me and really thanks ful to you i need some information about exchange 2003 server we have windows 2003 server on this server we install exchange 2003 i want to know that how i can hide memeber name in global address list of exchange serve regards syed ali H To hid user from GAL all you need to do is Go to the user properties -> exchange advanced tab Mark the "hide from exchange address list" check bo Regard Shai Netane Israel ...

add a node to XMLDocument
Hi, I'm new to XML programming. I'm writing a program in Visual Basic.Net that retrieves XML data from eBay. I want to store the results of a query in an xmlDocument. Here is an example, I pass an item number, and get back XML information about that listing. Response format here. http://developer.ebay.com./DevZone/shopping/docs/CallRef/GetSingleItem.html#Response I have an XML document that keeps a list of information about various items. I only use a few of the fields there. <?xml version="1.0" encoding="utf-8"?> <ItemList> &...