Hello Random People,

I'm new to C++, and I have some questions for all you'all. The first subject I'd like to talk about is Unary Operators. They give me a sample problem in the book. (The book is was published about 2 years ago)

Sample Problem:

int Result, A, B;

A = 4;
B = 23;
Result = 9 + (A++ - --B) * B

Result = ?

The answser -471.

I don't understand how you get that number. Can someone please explane to me how it works. :p

ahh your working on B-- decriment (-1)
it is before the b
--B

let you work out the rest :)

What you just said....just ....(?) I HAVE NO IDEA WHAT YOU'RE TALKING ABOUT!!!

But, check this out
VVVVV VVVVV VVVV VVVVVVVVVVV VV V VVV VVVVVVVVV VV

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.