There is a sample program in my C++ book that uses the += operator, and doesn't explain how it works:

gold += silver / SILVERPERGOLD;

What exactly does this mean?

shorthand for
gold = gold + silver

Be a part of the DaniWeb community

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