|
_AnShUmAn_ wrote: (char*)str.c_str(
This is a bad idea. The return type is const char * and casting away the const is wrong and the compiler is correct in complaining.
Steve
|
|
|
|
|
|
string s= "1";
strstream str;
int n;
str << s;
str >> n;
n++;
str.clear();
str << n << '\0';
s = str.str();
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
|
|
|
|
|
Hi Friends,
Could any one tell me how to paint in CMDIFrameWnd.
I want to the change the color of the Frame Window.
Thanks and Regards.
SANTHOSH V
|
|
|
|
|
Click Here ->[^]
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
Hi,
I am working on an application in which I am using MSFlexGrid.
I have 100 rows and 8 cols.
I am initializing all cells with some strings.
So when the user edits and saves, again when he retrives from the file, iam populating all cells with the saved strings like,
for(int i=0;i<100;i++)
{
for(int j=0;j<8;j++)
m_Grid.SetTextMatrix(i,j,s); //S is string which is read from file
}
It works fine in debug mode, but in release mode its giving an error like
"Subscript out of range".
Please if u have any idea help me.
Sunil.
Regards,
Sunil Kumar
|
|
|
|
|
i used the flex grid in release mode also. but i didnt face this sort of problem.
try to debug your application and see where exactly, you are getting this error.
other wise, you mail me your code then i can help you.
good luck.
|
|
|
|
|
hello chandu,
Thanks for the reply.
I solved the problem.Its not the problem with flexgrid.
The string was going out of bound.
One more thing, the compilation is taking some time if I include FlexGrid.
Is there any option to reduce it.
Regards,
Sunil Kumar
|
|
|
|
|
how much time does it take?
i mean, is there any difference between debug mode and release mode?
--------------------------------------------
Suggestion to the members:
Please prefix your main thread subject with [SOLVED] if it is solved.
thanks.
chandu.
|
|
|
|
|
Yeah, the difference is about 1.5 to 2 mins.
Regards,
Sunil Kumar
|
|
|
|
|
in this regard, i donot have any other clue except the following.
1.write one more application without grid and then with grid and see the difference.
2.try to compile your application in another system.
3.only thing you have to do is to localise weather the problem is with the code or grid or the system.
BTW, what is the size of your RC file is it normal or abnormal. just verify!
good luck.
--------------------------------------------
Suggestion to the members:
Please prefix your main thread subject with [SOLVED] if it is solved.
thanks.
chandu.
|
|
|
|
|
I have created a process using CreateProcess API.
i want to suspend/resume the process.
Thanx n advance.
|
|
|
|
|
|
Hamid. wrote: See Win32 process suspend/resume tool[^].
Good! how about starting and closing of process
"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
|
|
|
|
|
what are the different classes in VC++..?
kkr
|
|
|
|
|
What do you want to know?
|
|
|
|
|
Definitely.
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
|
|
|
|
|
didn't you listen to the teacher when in classroom ?
|
|
|
|
|
toxcct wrote: didn't you listen to the teacher when in classroom ?
Why bother, when you've good music instead?
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
|
|
|
|
|
CPallini wrote: Why bother, when you've good music instead? [Big Grin]
I used to do that, back in my college days. I also used to keep some snacks handy. But of course, only in boring classes.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Rajesh R Subramanian wrote: only in boring classes.
hummm.. i need to talk to your professors
"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
|
|
|
|
|
ClassA, ClassB, ClassC, ...
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I have to convert a color image to black and white using opencv.I used the following code.It didn't work.Is there any error in it?
src = cvLoadImage( path ); // load color image
IplImage* gray = cvCreateImage(
cvSize(src->width,src->height),
IPL_DEPTH_8U, 1);
cvCvtColor(image,gray,CV_RGB2GRAY);
|
|
|
|
|
projectip wrote: cvCvtColor(image,gray,CV_RGB2GRAY);
What is image ? Try
cvCvtColor(src, gray, CV_RGB2GRAY); insteaed.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
You can use of BitBlt for it,of course you must dont think it directly convert your color image to black and white.
for your code did you check return values?
|
|
|
|