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);
// The remaining steps are left to your exercise
"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
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
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?
google the issue, ask on msft forums, try to work out which compmonent is throwing the error. Get a working XP system and compare it to the embedded 2009 one, look for files, registry settings that are differemt.
I have see all kinds of crap with this version, it takes a lot of detective work to figure out quite how MSFT broke it.
Care to elaborate? Microsoft did not distribute prebuilt embedded OS images for that version. The embedded OS is built by you or someone in your organization using the 'Target Designer' which allows you to select from many thousands of packages.
If anything is broken... blame the guy who builds the OS image within your organization. The license back then was very restrictive... requiring each organization to list the licensed users by name.
I've built hundreds and hundreds of embedded OS images with the old XP and 2009 Target Designer... I believe the licensing is less restrictive these days... but I don't work in this area anymore so don't keep up with it.