Thread: number of variables

  1. #1
    C++Pandit
    Join Date
    Jul 2008
    Posts
    49

    number of variables

    how to create a program to ask the user to input a number and accordingly create the number of variables?

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by Saimadhav View Post
    how to create a program to ask the user to input a number and accordingly create the number of variables?
    You can't. Variables as such are created at compile time.

    You can perhaps create an array based on user input, if that's appropriate.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Random number + guessing game trouble
    By Ravens'sWrath in forum C Programming
    Replies: 16
    Last Post: 05-08-2007, 03:33 AM
  2. Stone Age Rumble
    By KONI in forum Contests Board
    Replies: 30
    Last Post: 04-02-2007, 09:53 PM
  3. Replies: 5
    Last Post: 02-09-2003, 10:03 AM
  4. Creating a student grade book-how?
    By Hopelessly confused in forum C Programming
    Replies: 5
    Last Post: 10-03-2002, 08:43 PM
  5. Replies: 4
    Last Post: 03-09-2002, 01:22 PM