|
Use '\\' instead of '\' because \ is a newline constant.
-@SuDhIrKuMaR@-
|
|
|
|
|
sofia_111 wrote: if(c='\"')
That's an assignement, not a comparison. What you are doing there is storing the character '\' in c and then checking if c is different than 0 (which is always the case because it contains the character you just assigned). You have to use == for a comparison.
|
|
|
|
|
yse sure i do this == in (if stattment)
|
|
|
|
|
Just adding one more point. This error occurs often and the best practice to avoid is to follow the following defensive style,
if( variable == constant )
{
}
if( constant == variable )
{
}
For instance,
if( variable = 1)
{
}
if( 1 = variable )
{
}
At first its a bit irritation for our eyes, but still it can save a lot of time.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Most modern compilers will issue a diagnostic for the
if (variable = constant) case when set to the maximum warning level.
I find the if (constant = variable) style intensely irritating.
|
|
|
|
|
exact:
iam looking for chractrers between " " in specified string
for(int i=0;i<gg[0].length();i++)
if (gg[0][i]==' " ')
{
t=i+1;
while (gg[0][t]!=' " ')
{
do any thing......
t++;
}
}
i do like this ( ==' " ') and this (==' \" ')
but didn't excute
|
|
|
|
|
gg[0][i]==' " '
gg[0][i] is a character.
' " ' is three characters.
|
|
|
|
|
just for explain
in programing i do as '"'
|
|
|
|
|
If its still making problem, then try this.
const char DoubleQuotes = 34;
...
if (gg[0][i]== DoubleQuotes )
{
}
BTW, is unicode defined in your project?
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
my friends :
the problem here '\"'
|
|
|
|
|
i need to do an operation twice,so i do a button click twice..but i get this error..in win core.cpp.what should be done???
ASSERT(pWnd->m_hWnd == NULL); // only do once
Raja
|
|
|
|
|
Please post the 'offending' code.
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
|
|
|
|
|
Can you Post code written for OnButton Ckick.
-@SuDhIrKuMaR@-
|
|
|
|
|
Can you show your code and is this question depends to your previous question?
|
|
|
|
|
And me too - "Please show the code snippet of Button click handler"
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Mohanraj D wrote: ASSERT(pWnd->m_hWnd == NULL); // only do once
Posting some code will help, but anyway! Looks like you are recreating a window that has already been created. You need to call DestroyWindow before recreating a window.
An ASSERT is provided just to warn you about an invalid action.
Nibu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
|
|
|
|
|
how to prevent multiple clicks over a button??i need the button click to be done only once and after the operations inside the button are complete i need to enable the button,what should be done??
Raja
|
|
|
|
|
If you think its not your answer more info is helpful when you clicked button you can check your situation if its not you can insert EnableWindow(0).
|
|
|
|
|
After click disable the button in button handler itself. After completing enable the button.
-@SuDhIrKuMaR@-
|
|
|
|
|
It was reply to me or to asker?
|
|
|
|
|
Call myButton.EnableWindow (FALSE); as first line in the called function, and with TRUE in the last line before returning.
Regards.
--------
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
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
i have a series of dialogs to be displayed in sequence but in a particular button click i have given the code to display the next dialog but it displays the previous dialog!!!!!y is that so???the code is and test2 is the next dialog
void test1main::OnBnClickedOk()
{
test2 onclick_ok;
onclick_ok.DoModal();
}
Raja
|
|
|
|
|
You want to show Dialog3 but you see Dialog2 when run this code?
|
|
|
|
|
yes...i want dialog3 to be displayed from dialog2 but dialog1 is displaying
Raja
|
|
|
|
|
How did you declare dialogs?
|
|
|
|