Thread: Question about mass inputting data

  1. #1
    Registered User
    Join Date
    Oct 2008

    Question Question about mass inputting data

    I have a program I need to write that requires inputting a lot of data at once. I know in QBASIC (sorry for the caps, but its an acronym) you can do it using Read/Data statements, but I'm not sure how to do it in C. I'm fairly new to C programming, just coming out of QBASIC, and not sure exactly what to do. Thank you!

  2. #2
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    segmentation fault
    Do you mean a large amount of text from a file source?
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  3. #3
    Registered User
    Join Date
    Sep 2008
    Toronto, Canada
    I am familiar with DATA and READ statements in a very old dialect of BASIC. If it's what you're talking about.... where there is a list of data items... then in C you can just initialize an array something like this:
    int array[] = { 12, 3, 7, 100};

  4. #4
    Registered User
    Join Date
    Oct 2008
    I meant data that you would normally input into the program, or scan for. I will try setting it up in an array and seeing if that works...if not, I'lll be back ^^

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Beginner Question - Linking a data file
    By noiprocs2 in forum C++ Programming
    Replies: 1
    Last Post: 06-16-2008, 08:58 AM
  2. Mass Data Storage, Files, Howto?
    By Zeusbwr in forum C++ Programming
    Replies: 11
    Last Post: 10-26-2004, 08:47 PM
  3. HUGE fps jump
    By DavidP in forum Game Programming
    Replies: 23
    Last Post: 07-01-2004, 10:36 AM
  4. Replies: 1
    Last Post: 06-07-2002, 11:22 AM
  5. Warnings, warnings, warnings?
    By spentdome in forum C Programming
    Replies: 25
    Last Post: 05-27-2002, 06:49 PM