Thread: to all math genius!

  1. #16
    stovellp
    Guest
    Well forgive me if I'm wrong magos, but doesn't ++X get incremented before the statement it's in, where X++ does the statement first and then increments the variable?

    Otherwise there'd be no diference between X++ and ++X.

  2. #17
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    but doesn't ++X get incremented before the statement it's in, where X++ does the statement first and then increments the variable?
    Yes, they do.
    Look, I have no intention to talk bad about pre/post inc/dec variables. It's just that IMO they make code less readable, but thats my opinion...
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Math
    By knightjp in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 04-01-2009, 05:36 PM
  2. Help with C++ Math
    By aonic in forum C++ Programming
    Replies: 4
    Last Post: 01-29-2005, 04:40 AM
  3. Basic Math Problem. Undefined Math Functions
    By gsoft in forum C Programming
    Replies: 1
    Last Post: 12-28-2004, 03:14 AM
  4. Math Header?
    By Rune Hunter in forum C++ Programming
    Replies: 26
    Last Post: 09-17-2004, 06:39 AM
  5. toughest math course
    By axon in forum A Brief History of Cprogramming.com
    Replies: 12
    Last Post: 10-28-2003, 10:06 PM