|
Ok.. I think I figured out the easiest way
DWORD dwStart = GetTickCount();
while( GetTickCount() - dwStart < WAITTIME ){
//loop for WAITTIME milliseconds
}
|
|
|
|
|
What about WM_TIMER ?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
I am confused that why we have to pass a reference of same class type into a copy constructor? I searched a lot but i am not able to find out the exact answer.So,plz if anybody can forward me the relevant answer of this question then plz forward it as soon as possible.Please specify the reason.
thanks..
|
|
|
|
|
For that you need to know, in which cases copy contructor constructor get called.
One of the place where it is called is when we pass parameter by value.
Thats why, to avoid recursive call, prameter to copy constructor is passed by reference.
-- modified at 4:48 Wednesday 13th December, 2006
|
|
|
|
|
pan_angel wrote: why we have to pass a reference of same class type into a copy constructor?
Obviously you'd.
Read it here[^]. I suggest you to read a good book on c++ or rather on the object oriented paradigm.
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
pan_angel wrote: I am confused that why we have to pass a reference of same class type into a copy constructor?
Which part are you confused about: the reference has to be the same class or that you have to
pass a reference?
The reference has to be the same class because it is a copy constructor - used to construct a copy
of an object of the class, as it's name implies.
The reference has to be there because it's the only way to access the object which needs to be
copied.
|
|
|
|
|
Hello everyone,
I am creating an array of structure as
struct Table
{
RFC_CHAR fieldname[35],
fieldvalue[255];
};
Table t2[2];
Now i m initialising this array in a funtion and i want the funtion to return this structure
as well as in another function i want to recieve this array and finally i want a pointer to point to this function
please tell me how can i do this
|
|
|
|
|
And what is the question?
Maybe you don't know how to pass the array?
Then have a look at the following code snippet:
<br />
void testStruct(Table *tp)<br />
{<br />
tp[0].fieldname = ...<br />
<br />
}<br />
hope that helps...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
no i dont want to pass the array to a function
i have created array of a structure and initialised it in function A and A returns this array
the struct is declared global
now in function B i want to call funtion A and take its return value which would be the array in an array variable
|
|
|
|
|
Sorry, I can't figure what do you want to do...
Can you please post the code snipped that is giving you troubles?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Table *SomeFuncThatReturnsIt( void )
{
Table *pTbl = new Table[ 2 ];
if( pTbl )
{
}
return( pTbl );
}
Something like that will allocate the array of structures, initialize them as required, and then return a pointer to the array, or return NULL if allocation fails (if your new works that way). The caller is now responsible for deallocating the memory referenced by the pointer, of course.
This is not generally how I like to do things, because I avoid hand-off memory whenever possible, but I believe it will get you in a direction of what you want to do.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
I'm developing a set of classes to read the infamous 'index.dat' files. There is very little information about the format of these files available, so far most of my searches have turned up viewer utilities and info on how to delete them, but nothing much on the actual format.
Looking through a hex dump I have managed to identify maybe 30% of the items. If you know or have come across any details about these files, I would really appreciate your help.
|
|
|
|
|
|
I had already looked at it and it's not really what I'm looking for. Those scripts simply parse the .dat files locating the relevent info. Reading these files is relativly simple, but adding and modifying them will require a little more work.
|
|
|
|
|
WalderMort wrote: I had already looked at it and it's not really what I'm looking for. Those scripts simply parse the .dat files locating the relevent info. Reading these files is relativly simple, but adding and modifying them will require a little more work.
In your initial request was the statement, "I'm developing a set of classes to read the infamous 'index.dat' files." It helps others to help you if you state what you want, what you don't want, and what you already know, when making such requests.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi all:
How to get "general" tab info from "sys property" pragrammatically, I'm trying to identify Windows XP 64bit OS, but with GetVersionEx I always get "Windows Server 2003" instead of XP. But I saw the info on "General" tab was correct, So...
|
|
|
|
|
|
How are you using the returned structure?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I m trying to make a list control in sdi application using create function.
Like this...
Create(WS_CHILD|WS_VISIBLE|WS_BORDER|LVS_REPORT,
CRect(300,300,800,600), this, 1);
This is creating my list control in particular area(i.e the co-ordinates specified in CRect)
but i want that it should occupy my whole sdi window how to do it????
|
|
|
|
|
why dont u create a sdi application with listview. in the appwizard, u can find option for this in the last page.
nave
|
|
|
|
|
Are you using MFC?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi All
I am doing project in VC++ , in which i want to display messages in japanese. What changes i need to make in code and any other setting.
Regards
M.Atul
M.Atul
|
|
|
|
|
specify _UNICODE in the preprocessor directive.
nave
|
|
|
|
|
Hi, I am already completing this project ,actually with the help of unicode standard u can do it,i am sending u one site
http://www.unicode.org/charts[^]
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
Hi all,
How can i convert a TCHAR to a string?
for example:
<code>
TCHAR infoBuf[INFO_BUFFER_SIZE];
GetComputerName( infoBuf, &bufCharCount );
string pc;
... convert / assign the value of infoBuf to pc ...
</code>
Many Thanx
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|