Thread: Reading data from a randomly accessed file

  1. #1
    I am Diamond Dave
    Join Date
    Mar 2006
    Location
    You'll get some leg tonight for SURE!
    Posts
    34

    Reading data from a randomly accessed file

    I want my program to open up a text file....in visual c++ do i have to put the text file in 'source files' 'header files' or 'resource files' folder? Also when i save the text file that i'm going to use do i save it as a text file or a "ms-dos text file"?

  2. #2
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    your best bet is to save the file as plain text (no fancy formatting or fonts) in the folder where the executable resides.
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

  3. #3
    I am Diamond Dave
    Join Date
    Mar 2006
    Location
    You'll get some leg tonight for SURE!
    Posts
    34
    ok thanks

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Can we have vector of vector?
    By ketu1 in forum C++ Programming
    Replies: 24
    Last Post: 01-03-2008, 05:02 AM
  2. gcc link external library
    By spank in forum C Programming
    Replies: 6
    Last Post: 08-08-2007, 03:44 PM
  3. reading in file data
    By sickofc in forum C Programming
    Replies: 2
    Last Post: 03-01-2006, 05:16 PM
  4. Post...
    By maxorator in forum C++ Programming
    Replies: 12
    Last Post: 10-11-2005, 08:39 AM
  5. what does this mean to you?
    By pkananen in forum C++ Programming
    Replies: 8
    Last Post: 02-04-2002, 03:58 PM