Thread: Increment number of variables?

  1. #1
    Registered User
    Join Date
    Sep 2011
    Posts
    117

    Increment number of variables?

    Is it possible to make an increasing set of variables?

    I.E.
    Input: Amount of variables you want
    Output: said amount of variables (similar names, i.e. C1, C2, C3...)

    or

    Input: Nothing
    Output: Incrementing amount of variables with similar names (like a type of infinite loop)

  2. #2
    [](){}(); manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    *nullptr
    Posts
    2,657
    Well, put the values in a std::vector and run it through a for_each; giving an 'increment' function as an argument.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Just weird...I have the same number of variables
    By arti in forum C Programming
    Replies: 2
    Last Post: 05-13-2010, 10:37 PM
  2. 2 largest number,3 variables only
    By freddyvorhees in forum C++ Programming
    Replies: 2
    Last Post: 08-01-2008, 07:13 AM
  3. number of variables
    By Saimadhav in forum C++ Programming
    Replies: 1
    Last Post: 08-01-2008, 06:06 AM
  4. Declaring an variable number of variables
    By Decrypt in forum C++ Programming
    Replies: 8
    Last Post: 02-27-2005, 04:46 PM
  5. Variables number of arguments error
    By xErath in forum C Programming
    Replies: 3
    Last Post: 11-19-2004, 10:27 PM