Reading a column from a .dat file

This is a discussion on Reading a column from a .dat file within the C++ Programming forums, part of the General Programming Boards category; Hi every one, I would like your help. I want to run my c++ program using a input data file. ...

  1. #1
    Registered User
    Join Date
    Jul 2010
    Posts
    3

    Post Reading a column from a .dat file

    Hi every one,

    I would like your help.

    I want to run my c++ program using a input data file. Into the file I declare some paramaters. For instance, my input data file could be:

    input.dat

    2 //Minimum frequency
    10 //Maximum frequency
    15 //Binning number

    So, I want to read only the numbers (2,10,15), but I don't know how can I do it..

    Any idea..??

    Thanks

    Manuel

  2. #2
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    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

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to add a column of data to a .txt file?
    By Blah937 in forum C++ Programming
    Replies: 8
    Last Post: 07-07-2011, 03:59 PM
  2. Code to search a file and take out a column
    By coletrain in forum C++ Programming
    Replies: 24
    Last Post: 01-27-2009, 04:12 PM
  3. Column count from data file
    By spiit231 in forum C Programming
    Replies: 6
    Last Post: 02-27-2008, 12:59 PM
  4. Reading / input column of numbers into an array
    By boyfarrell in forum C Programming
    Replies: 6
    Last Post: 08-28-2005, 11:24 AM
  5. Writing to a column in a text file
    By olland in forum C Programming
    Replies: 2
    Last Post: 01-21-2002, 06:40 AM

Tags for this Thread


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