|
No, only the #include <string>
I appreciate your help all the time...
Eranga
|
|
|
|
|
I would say it is much better than using the C functions (sscanf, atoi, ...) because you are consistent (you used string, so stay with the tools the stl provides you). I don't like the idea of mixing C++ (std::string) with C (atoi, sscanf, ...).
What is this thing with GetFileTitle ? std::string doesn't have such a function so it shouldn't even compile (except if you pasted a wrong piece of code).
|
|
|
|
|
Hi Cédric,
What happend for your name?
|
|
|
|
|
Yeah, I realized that too. Don't know what happen but when I update my settings, it complains that my name is too long (even if it is under the limit of 50 chars). I removed the bold tag now, let's see if that works.
|
|
|
|
|
I think its problems of upgrade for example see Default icon is changed of question to general.
|
|
|
|
|
Actually I don't get any error on that code.
And also even me don't like to mix-up C and C++
I appreciate your help all the time...
Eranga
|
|
|
|
|
You could also use boos::lexical_cast[^]
It does the gory details of the stream-woking wrapped nicely in a routine that looks like a cast.
Let's think the unthinkable, let's do the undoable, let's prepare to grapple with the ineffable itself, and see if we may not eff it after all. Douglas Adams, "Dirk Gently's Holistic Detective Agency"
|
|
|
|
|
Manish_mnp wrote: You can not write like this.
You have to write :
string FullPath = "c:\Test\MyProject\G00062_002_01.srf";
You can not write like this.
You have to write :
string FullPath = "c:\\Test\\MyProject\\G00062_002_01.srf";
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Yep you are right. Actually that file path not written on the application. It is find from the application and I've just use it.
I appreciate your help all the time...
Eranga
|
|
|
|
|
Do you want to convert string values to int?
|
|
|
|
|
Yep, actually my required values are there in a string. I want add those values as int in a Database.
I appreciate your help all the time...
Eranga
|
|
|
|
|
Did you see functions like atoi and itoa.
|
|
|
|
|
Those are from C right, not C++ functions. Is it better to mix up them. Actually I don't like to do it.
I appreciate your help all the time...
Eranga
|
|
|
|
|
Eranga Thennakoon wrote: How should I do this conversion.
Have you considered atoi() ?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Read above, he doesn't want to mix C with C++ (BTW i don't see where the problem is)
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
Hi
I am creating a MAC OS Type dock bar application (Similar to Object dock) on Windows for one of our customer. I need to implement auto hiding feature in dock bar (similar to auto hide feature in windows task bar). As per my knowledge only possible way to implement auto hide is to use SetWindowsHookEx API to create System hook for mouse event.
Now the problem is that I heard that all application that is using SetWindowsHookEx api are detected as spyware by most anti virus and other tools.
Can some one suggest how can I use SetWindowsHookEx safely or any other way to implement auto hide feature in these kinds of applications.
http://Faq.Programmerworld.net
(FAQ and Tips for programmers)
|
|
|
|
|
Sudhir Mangla wrote: Now the problem is that I heard that all application that is using SetWindowsHookEx api are detected as spyware by most anti virus and other tools.
I have used the SetWindowsHookEx() in some application. But haven't got the warning from the antivirus yet( tried in norton ).
How ever try putting the SetWindowsHookEx in a dll. I.e create a function in the dll and eport it. inside that function call the SetWindowsHookEx.
|
|
|
|
|
Hello everyone.In my program,I want to change a file's content,so I create a create file to copy data from source file and write new data,too.
When all file reading and writing completed,I want to delete the source file and rename the temp file to the source file name.If the source file path is sourcePath,and the temp file path is tempPath,my codes look like following:
if(remove(sourcePath)==0)//sourcePath is the full path of the source file
rename(tempPath,sourcePath);
Of course,the source and temp file are in the same directory.
But it is strange that,if i separate the codes as a short test console project,it works well!
Someones would like to tell me why?
Thanks.
GOOD LUCK
|
|
|
|
|
kcynic wrote: But it is strange that,if i separate the codes as a short test console project,it works well!
Someones would like to tell me why?
If rename() is failing, check errno .
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Are you sure path is correct?
|
|
|
|
|
Hello. I'm trying to parse some web data with the following code. It's going reasonably well, but I seem to get control characters (little squares) in the CString, making the parsing more difficult. If they're on the end I can use Trim() to remove them, but if they're in the middle it's more problematic. Since I can't represent them with the keyboard it's difficult to use the Span functions. Does anyone have any suggestions? Thank you.
IHTMLElement* pElem;
hr = pHTMLDocument2->get_body( &pElem );
if ( hr == S_OK && pElem != NULL )
{
pElem->get_innerText(&bstr);
CString strInnerText = bstr;
ScrapeFuturesSettlementData( strInnerText );
}
pHTMLDocument2->Release();
Tom
|
|
|
|
|
Do you know the ASCII value of said "square" characters?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
|
How to load a image from a file and show it with a dialog box in VC++ 6?
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
If you are using MFC, and your dialog template has a static control on it, check out CStatic::SetBitmap() . Otherwise, if you want the image to be the dialog's background, see here.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
modified on Wednesday, December 05, 2007 8:57:09 AM
|
|
|
|