to all math genius!

This is a discussion on to all math genius! within the C++ Programming forums, part of the General Programming Boards category; Well forgive me if I'm wrong magos, but doesn't ++X get incremented before the statement it's in, where X++ does ...

  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.

Page 2 of 2 FirstFirst 12
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, 03:40 AM
  3. Basic Math Problem. Undefined Math Functions
    By gsoft in forum C Programming
    Replies: 1
    Last Post: 12-28-2004, 02: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, 09:06 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21