|
Michael Schubert wrote: Thanks for enlightening me!
We aim to please.
BTW, this is just another crime of the THHB. Look how much it's been hijacked.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
Rajesh R Subramanian wrote: Look how much it's been hijacked.
Combined efforts really pay off.
|
|
|
|
|
Hey! You and Sandip, evil guyz, are making be bouncing from this thread to my memberpage...
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
You've used this before. When are you going to actually register it?
Saying that, maybe the bandwidth bills would be too high, as we'd all refer people there!
Iain.
|
|
|
|
|
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Use ReverseFind() instead of Find().
CString DirPath;
CString FullPath = _T("C:\\abc\\cd\\as.txt");
int nPos = FullPath.ReverseFind( _T('\\') );
if( nPos >= 0 )
{
DirPath = FullPath.Mid( 0, nPos);
}
AfxMessageBox(DirPath);
|
|
|
|
|
rdop wrote: CString array[10]
Which will hold strings like:
array[0] = "This is string 1";
array[1] = "This is string 2";
array[2] = "This is string 3";
...
array[9] = "This is string 10"; Is that really what you intended?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Use PathRemoveFileSpec() .
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
hi all,
I am getting error C2061: syntax error : identifier 'string' at this code
std::string LoadInstaller(__in UINT nID, string tcItemText);
std::string LoadProduct(__in UINT nID);
std::string LoadInstaller(UINT nID , string tcItemText)
{
ATL::CString StrTable;
string InstallerKey;
InstallerKey = "";
StrTable.LoadStringA(IDS_ServiceRegEntry);
InstallerKey.append(StrTable.GetString());
StrTable.LoadStringA(IDS_LongProjectName);
InstallerKey.append(StrTable.GetString());
StrTable.LoadStringA(IDS_ServiceParam);
InstallerKey.append(StrTable.GetString());
InstallerKey.append("\\");
StrTable.LoadStringA(nID);
InstallerKey.append(StrTable.GetString());
InstallerKey.append("\\");
InstallerKey.append(tcItemText);
return InstallerKey;
}
std::string LoadProduct(UINT nID)
{
ATL::CString StrTable;
string ProductKey;
ProductKey = "";
StrTable.LoadStringA(IDS_ServiceRegEntry);
ProductKey.append(StrTable.GetString());
StrTable.LoadStringA(IDS_LongProjectName);
ProductKey.append(StrTable.GetString());
StrTable.LoadStringA(IDS_ServiceParam);
ProductKey.append(StrTable.GetString());
ProductKey.append("\\");
StrTable.LoadStringA(nID);
ProductKey.append(StrTable.GetString());
return ProductKey;
}
I have already included <string>, i dont know what seems to be the problem. Any Advice?
Thanks,
Jayjay
|
|
|
|
|
monsieur_jj wrote: I have already included
What have you already included?
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
You have forgotten the namespace std::string .
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
He probably has, but omitting the std namespace should have produced a C2065 error.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
It seems you need to include a header file.
|
|
|
|
|
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?
|
|
|
|