|
Is var,s and var,su some VS-setting or something? I don't know what I'm using... sorry... where do I check it?
Regards,
Michael Mogensen, mm it-consult dk.
><((((º> ·.¸¸.· ><((((º> ·.¸¸.· ><((((º>
|
|
|
|
|
Michael Mogensen wrote: Is var,s and var,su some VS-setting or something?
Yes, for the watch window.
Michael Mogensen wrote: where do I check it?
See here.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Maybe I missed it somewhere, but where are you using this char data? The interpretation of
crlf and/or newlines varies by use.
|
|
|
|
|
I want to serialize an object that has a long* member. How do i do that?
|
|
|
|
|
Obviously you cannot serialize it in that format (it will only serialize the pointer, not the contents). What you need to do when saving your data is serialize the contents (for example, if this is an array of long, then serialize the number of elements and then serialize each element). Then, for loading, do the opposite operation: load the number of elements (and then allocate your array), then load each element.
|
|
|
|
|
I knew that it would not help me much to serialize the pointer to my long list. This is what i do:
void CMyObj::Serialize(CArchive& a)
{
if (ar.IsStoring())
{
ar<<m_nCount;
for(int i = 0;i<m_nCount;i++)
ar<<m_list[i];
}
else
{
ar>>m_nCount;
m_list = new long[m_nCount];
for(int i = 0;i<m_nCount;i++)
{
arr>>m_list[i];
}
}
}
What am i doing wrong? m_nCount gets read corectly but m_list is always filled whith 0's
|
|
|
|
|
eusto wrote: What am i doing wrong? m_nCount gets read corectly but m_list is always filled whith 0's
This should work. Are you sure you are not writing an array of 0s?
m_list is declared as a "long *"?
void CMyObj::Serialize(CArchive& ar)
{
if (ar.IsStoring())
{
ar << m_nCount;
for(int i = 0; i < m_nCount; i++)
ar << m_list[i];
}
else
{
ar >> m_nCount;
m_list = new long[m_nCount];
for(int i = 0; i < m_nCount; i++)
{
ar >> m_list[i];
}
}
}
|
|
|
|
|
HOW CAN I DISPLAY THAT NETWORK IS AVAILABLE OR NOT IN MFC ON CLICKING A BUTTON
pradeep
|
|
|
|
|
Do u mean Network means Internet connectivity?
Come online at:-
jubinc@skype
|
|
|
|
|
Please use
MultinetGetConnectionPerformance();
|
|
|
|
|
1) please read this[^]
2) then have a look here[^]
|
|
|
|
|
wrote: MultinetGetConnectionPerformance
don't shout.. what type of network connection are you looking for???
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
Why *pBDLd = *pA3Ld; is not going into the function:
void CSpanLoad::operator=( const CCASObject &src )
{
//....
}
In VC6 it was going..In VC8 it s not going?
Thanx
|
|
|
|
|
I'm not sure exactly, but VC8 is a world away from VC6, in terms of standards compliance. I'd guess you've found a place where VC6 is non compliant. What if you put brackets around the dereferencing operators ? How about if you make the right hand value const ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Not working..
When i give *pBDLd = *pA3Ld it is showing error at compile time as:
error C2248: 'CObject::operator =' : cannot access private member declared in class 'CObject'"
see declaration of 'CObject::operator ='
see declaration of 'CObject'
This diagnostic occurred in the compiler generated function 'CPtrArray &CPtrArray::operator =(const CPtrArray &)'
|
|
|
|
|
You still haven't implemented an assignment operator for your CObject-derived class.
The CPtrArray class' assignment operator REQUIRES you to have good copy semantics on the class
you store in it.
|
|
|
|
|
How is CSpanLoad defined?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
class __declspec ( dllexport ) CCASObject : public CObject
{
public:
virtual void operator=( const CCASObject& ){}
};
class CSpanLoad : public CCASObject
{
public:
void operator=( const CCASObject& );
};
//spanload.cpp
void CSpanLoad::operator=( const CCASObject &src )
{
//....
}
|
|
|
|
|
who creat data base connectivity .NET.plz send me all information on that email "chandni1190@hotmail.com"
naveed
|
|
|
|
|
naveedakram86 wrote: who creat data base connectivity
Is this supposed to be a coherent question?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
i need to write small aplication that return the angle of two clock poiners.
the function get the minute and hour and return the angle.
|
|
|
|
|
SOHCAHTOA
In other words, sin theta = the opposite over the hypotenuse, cos theta = the adjacent over the hypotenuse, and tan theta = the opposite over the adjacent.
In other words, use trig.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Christian Graus wrote: SOHCAHTOA
Heh! I've never seen that one before!
|
|
|
|
|
*grin* I learned that in high school maths, and never forgot it. I've used a lot of trig in my programming over the years.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
No need for trig. First we'll just consider the hour hand. On a clock 12 hours is 360 degrees. So the angle of the hour hand (Ah) is given by the following formula (h is the hours):
Ah = 360.0*h/12.0
This formula assumes that Ah can be fractional so 1:30 would be represented as 1.5.
Now we’ll work in the minute hand (m is minutes). On a clock 60 minutes is 360 degrees, So the angle of the minute hand (Am) is given by the following formula:
Am = 360.0*m/60.0
Now we’ll put this together. First assume that we feed in the hours as an integer since the fraction part can be calculated from the minutes. In this case we should adjust h as follows:
h = h+m/60.0
After this we just use the above two formulas. I’ll leave the rest to you. There are some gotchas.
Steve
|
|
|
|