|
Could you please explain me how to store pointers to the dialogs when they are created so that I can get and set the name from the class that holds the pointers to the dialogs? I'm sorry for asking again but I got a little confused with this part.
|
|
|
|
|
Such is only useful with modeless dialogs. Modal dialogs will block so that there is usually no need to have a pointer.
However:
if (NULL == m_pSomeDlg)
{
m_pSomeDlg = new CSomeDialog(this);
} When doing so m_pSomeDlg must be initialised with NULL in the constructor and deleted in the destructor.
|
|
|
|
|
What number will z in the sample code given below?
int z, x=5, y= -10, a=4, b=2;
z=x++ - --y *b/a;
Can anyone please solve it and explain the precedence. i am not getting right answer. my answer is 2.5. but it is wrong. i am struggling in it. kindly solve it and explain. Thanks in advance.
|
|
|
|
|
|
thank you. i am clear now
|
|
|
|
|
See C++ Operator Precedence - cppreference.com[^].
The first step is inserting parentheses according to the predence and order:
z = (x++) - (((--y) * b) / a);
Then replace the variables with their values:
z = (5++) - (((--(-10)) * 2) / 4);
Now solve step by step but observe the special handling of the postfix operator which will return a temporary copy that contains the value before the operation (that means x will be changed but the initial value of 5 is used for the calculation). Observe also that results might get rounded wirh integer arithmetic:
z = (5) - ((-11 * 2) / 4);
z = 5 - (-22 / 4);
|
|
|
|
|
parkavikkk wrote: int z, x=5, y= -10, a=4, b=2;
z=x++ - --y *b/a;
Can anyone please solve it and explain the precedence. i am not getting right answer. my answer is 2.5. but it is wrong.
Of course it is wrong! Just because the integer number cannot be 2.5, nor 2.7, nor 2.8...
|
|
|
|
|
Maybe the OP was manually calculating it?
|
|
|
|
|
hi, I recently come accross pla.h
what's the purpose of it ?
|
|
|
|
|
I guessing it has to do with declarations associated with Windows performance logs and alerts [^].
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
It's a header file. Open it up to reveal its contents. If things are named appropriately and/or it's commented well, you should be able to ascertain its purpose.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
I checked it before I ask this question....
anyways thank you for the answer...
I already got the answer from stackoverflow but my question got block...
so I wonder how this forum will react
|
|
|
|
|
(not really urgent)
I decided to try out the C++ Core Check code analysis on a sample project to see if it will be useful for our project.
One one line it says that I need to put a const , so I put the const , and re-run the analysis.
The line still will trigger the warning.
Any way to reset the warnings so that it won't retrigger the same warnings ?
Any experience with that ?
Thanks
I'd rather be phishing!
|
|
|
|
|
If you right-click the warning do you get a menu with Suppress on it?
|
|
|
|
|
I don't want to suppress the warning, just to not report it on lines that it should not appears (after fixing the warning).
Anyway, it is only a minor annoyance, will keep testing/using it .
Thanks.
I'd rather be phishing!
|
|
|
|
|
As I say, if you right-click the warning you can suppress it for that line, not suppress the warning for every line.
|
|
|
|
|
Yes but he's saying that he did what the warning wanted and the warning keeps coming up anyway on that line.
He's asking for a way to make it work right.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
"Any way to reset the warnings so that it won't retrigger the same warnings ?"
|
|
|
|
|
Hi All,
I have a C++ application which reads access (.mdb) file. This application runs fine on Windows XP,7 OS. But when I run the application on Embedded Standard OS, it gives me System Error 126 (Microsoft Access Driver).
What would be the best solution for this?
Kindly help in solving this problem.
Thanks In advance
|
|
|
|
|
That usually indicates a missing or mis-configured driver. You need to check that the Access driver is correctly installed.
|
|
|
|
|
Hello
Thanks for taking time to answer.
Now I've installed MS-office and Access database Engine 2010 drive also. Bit still the application is giving same error.
The OS is Windows Embedded Standard 2009, service pack 3.
Is there any other way to solve this problem? Like by using different driver from code instead of Microsoft Access Driver (*mdb)?
|
|
|
|
|
The error code alone is not enough. You need to find out where and why the error is being raised.
|
|
|
|
|
The error is occurring when access database is tried to open.
As you said in the previous reply, missing of driver, Can the driver be installed explicitly by using any tool?
The problem here is I'm not having the CD of OS using which I could have reinstalled the missing driver.
can you suggest any other way to fix it
|
|
|
|
|
Sorry but I have never used it in embedded. You will need to use the debugger, or similar tool, to gather more information. Have you tried Google to see if other people have come across the same problem?
|
|
|
|
|
Ya I searched. everywhere they are suggesting to install the driver using installation CD which currently I'm not able to as I do not have a CD..
|
|
|
|