|
i already included string header
|
|
|
|
|
Did you include?
#include <iostream>
using namespace std;
|
|
|
|
|
Please use the "<" and ">" links at the bottom when posting, otherwise the code is not readable.
On the other hand my previous post stands: he forgot to prefix the string variable declarations inside the functions with the namespace std .
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
|
|
That does not seem a setting for project because I need to Choose "C/C++" tab -> "Preprocessor" category. In test opencv propery does not have C/C++ tab
|
|
|
|
|
C/C++ tab would be just right there under configuration properties.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
|
I won't click on another link if it ponits to a 2 Mb Bitmap. Why can't you upload it as a JPG?
And to solve your problem, is that an empty project[^]? The C/C++ settings applies for the files that belong to the properties of a project. So, if you don't have files, then the tab shouldn't appear. Try adding files to your project first.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
There are no settings for C++ because you don't have any files in the project. Add some files and the settings will appear.
-Saurabh
|
|
|
|
|
Hi All
I am useing SHFileOperation.Code is here
void CAbc::OnBnClickedButton1()
{
CString pzFrom=_T("C:\\Test\\");
CString psTo=_T("C:\\");
CopyFolder(pzFrom, psTo);
}
void CAbc::CopyFolder(LPCTSTR pszFrom, LPCTSTR pszTo)
{
SHFILEOPSTRUCT fos ={0};
fos.wFunc = FO_COPY;
fos.pTo = pszTo;
fos.pFrom = pszFrom;
::SHFileOperation(&fos);
}
Both Directory exits.I am geting Error this on Dailog Box
Could not find this item
This is no longer in C:\Test\.Verify the Item's location and try again.
I am not to figure out why this is happen.Becouse both directory exits.
Plz help me
|
|
|
|
|
Where's your name file in this code?
|
|
|
|
|
Sorry Sir i am not geting waht you want to know from me?Plz tell me
|
|
|
|
|
|
Plz help me it's urgent sir..
|
|
|
|
|
Hi,
There you have just specified two folders name.
What happened to the file name.
Because its SHFileOperation file operation..
|
|
|
|
|
TeVc++ wrote: urgent
For urgentz matterz plz askz CPallini. He willz helpz.
|
|
|
|
|
TeVc++ wrote: Plz help me it's urgent sir..
Of course when you use of this phrase you must be wait for CPallini but
your code is working for me:
SHFILEOPSTRUCT p={0};
p.wFunc = FO_COPY;
p.pTo = _T("c:\\");
p.pFrom = _T("c:\\2\\1");
SHFileOperation(&p);
You got this error because you use of p.pFrom = _T("c:\\2\\"); but you must be set a name after \\
|
|
|
|
|
Did you try to use flags for SHFILEOPSTRUCT, like FOF_MULTIDESTFILES ? Did you read the documentation?
|
|
|
|
|
Try this:
LPCTSTR lpFrom = _T("D:\\SymbianDev\\Test\0");
LPCTSTR lpTo = _T("D:\\SymbianDev\\Test1\0");
SHFILEOPSTRUCT fos ={0};
fos.wFunc = FO_COPY;
fos.pTo = lpTo;
fos.pFrom = lpFrom;
if(::SHFileOperation(&fos) == 0)
cout<<"SHFileOperation succeeded"<<endl;
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
modified on Friday, October 3, 2008 6:42 AM
|
|
|
|
|
One suggestion
Rajesh R Subramanian wrote: LPCTSTR lpFrom = _T("D:\\SymbianDev\\Test");
LPCTSTR lpTo = _T("D:\\SymbianDev\\Test1");
should end with two null characters
At least document says that i don't know if it works without that
Regards,
Sandip.
|
|
|
|
|
Luckily, it works. But that's a good point there. I will modify my previous post.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
Hi all,
I am having a list(queue)of tasks. My two threads are using the same list.
First thread is to insert the task into it. (appending the list)
Second thread is to process on each task . ( reading the list)
My aim is to give the maximum availability to Thread one without hanging thread two.
How to synchronize both thread so that, second thread should not wait for long and First thread keep inserting the item into list.
Thanks in advance
|
|
|
|
|
critical section! look for CCriticalSection class in MFC!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/xml>
|
|
|
|
|
A piece of good advice is to stay clear of the MFC synchronization objects because they are not working properly. They may fail under certain circumstances.
E.g. you cannot recursively lock a CCriticalSection from the same thread because it will cause a deadlock.
Use the Win32 API with ::EnterCriticalSection() and ::LeaveCriticalSection() instead.
Read more here[^].
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|