|
|
|
hi world. I am looking a function or attributes in class qtimer in qt that holds the time passed. can anyone say me is there any function or attributes that hold or return the time passed?
thanks
|
|
|
|
|
|
|
thank you very much my friend. you help me very much
|
|
|
|
|
hi every body , i have a project using c++(QT) , i want to detect any file change(remove, create..) in a directory , i found The Ultimate Toolbox file watcher Demo , and it's works fine and it will help me a lot if i find the source code , but when it try to download the source code it show me this message :
Ticket: (No ticket provided - possibly an error in the error-system)
Error: An error occurred in this page. The error has been recorded and the site administrator informed.
Abort, Retry, Fail?
so please if any one have the source code give it to me (my e-mail if you want : aminescm3@gmail.com) or juste put the link here.
|
|
|
|
|
|
Read about ReadDirectoryChangesW() and FindFirstChangeNotification().
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
I'm using Visual Studio 2013.
I don't konw why get crash in these following scenarios. What am I missing?
Crash in this function:
extern "C" _CRTIMP int __cdecl _CrtIsValidHeapPointer(
const void * pUserData
)
{
if (!pUserData)
return FALSE;
if (!_CrtIsValidPointer(pHdr(pUserData), sizeof(_CrtMemBlockHeader), FALSE))
return FALSE;
return HeapValidate( _crtheap, 0, pHdr(pUserData) );
}
Scenario 1:
std::shared_ptr<int> foo()
{
std::shared_ptr<int> p(new int(10));
size_t cnt = 10;
while (cnt--)
p.get()[cnt] = roll_die();
return p;
}
void func(int* ptr, size_t cnt)
{
while (cnt--)
{
cout << ptr[cnt] << endl;
}
}
void main()
{
std::shared_ptr<int> u_ptr = nullptr;
u_ptr = foo();
func(u_ptr.get(), 10);
}
Scenario 2:
std::unique_ptr<int> foo()
{
std::unique_ptr<int> p(new int(10));
size_t cnt = 10;
while (cnt--)
p.get()[cnt] = roll_die();
return p;
}
void func(int* ptr, size_t cnt)
{
while (cnt--)
{
cout << ptr[cnt] << endl;
}
}
void main()
{
std::unique_ptr<int> u_ptr = nullptr;
u_ptr = foo();
func(u_ptr.get(), 10);
}
modified 29-May-14 4:52am.
|
|
|
|
|
|
CPallini wrote: Scenario 1 doesn't 'crash' on my system.
I'm using Visual Studio 2013.
|
|
|
|
|
Please, see my updated answer.
Veni, vidi, vici.
|
|
|
|
|
It took a while, but I just figured that out too.
|
|
|
|
|
Richard MacCutchan wrote: t took a while, but I just figured that out too.
Yes, sometimes it takes a while to figure out we need more and more caffeine.
Veni, vidi, vici.
|
|
|
|
|
CPallini wrote: we need more and more caffeine. Speak for yourself, I need more brain.
|
|
|
|
|
Me too. Caffeine is way more practical, though.
Veni, vidi, vici.
|
|
|
|
|
Hi,
The std::unique_ptr[^] is unique meaning non-assignable and non-copyable so you will need to use move semantics to pass it around or give up ownership with unique_ptr::release()[^].
func(u_ptr.release(), 10);
Best Wishes,
-David Delaune
|
|
|
|
|
In ms paint save as option is there i want the sample code for that .can any body give ..or anybody have share it. please its urgent because what iam doing means i have images which are not fixed to screen so many images are there iam scrolling and taking screen shots and thats why its flickering.i saw ms paint save as image in png format how much u will have image it will not flicker. please help give code for ms paint save image code in mfc
modified 28-May-14 2:35am.
|
|
|
|
|
Please detail a little bit .. .you want to save something that you paint ? As bitmap ?
|
|
|
|
|
imran.prdc wrote: i want the sample code
imran.prdc wrote: please help give code
In both cases, if you want sample code then you should go and search for it, There are many articles that can be found here on CodeProject, or by Google, that show how to manage images.
|
|
|
|
|
please give me some links
|
|
|
|
|
please give me some links which are useful
|
|
|
|
|
I already told you where to look, please make an effort to do your own research.
|
|
|
|
|
No. We can't. You haven't described your problem well enough for us to properly search for it. Only you know what you need exactly, so you do the search!
Besides, even if you took the time to precisely describe what you want, it would take as at least as much time to search for those links as it would take you - so why should we? Please learn to use the search function, here, on google, or on any other site that you might consider useful (e. g. MSDN). That will save everyone a lot of time - including yourself!
|
|
|
|