Thread: argv

  1. #1
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Waterloo, Texas


    How do I get the filenames in a directory if the directory/folder was typed on the command line?
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
        return std::pow
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Getting directory information depends on your compiler/OS. You can always use it combine with system to pipe the information to a text file and read it that way. Not a great way to do it, but it'd work. Search the past messages, I'm sure there have been posts on directory listing here in the past.

    Hope is the first step on the road to disappointment.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. help getting a grib on argc and argv
    By elwad in forum C Programming
    Replies: 10
    Last Post: 05-01-2009, 10:13 AM
  2. argv
    By taurus in forum C Programming
    Replies: 15
    Last Post: 10-14-2007, 08:57 AM
  3. Using argc and argv data
    By Rad_Turnip in forum C Programming
    Replies: 4
    Last Post: 03-31-2006, 06:09 AM
  4. how do i? re: argc - argv
    By luigi40 in forum C Programming
    Replies: 2
    Last Post: 06-11-2004, 10:17 AM
  5. more argv and argc
    By Unregistered in forum C Programming
    Replies: 6
    Last Post: 09-08-2001, 11:04 PM