List file

This is a discussion on List file within the C Programming forums, part of the General Programming Boards category; im looking for a easy way to list files/directpries, almost a basic ls command program. i have checked out a ...

  1. #1
    martin_00
    Guest

    List file

    im looking for a easy way to list files/directpries, almost a basic ls command program. i have checked out a couple website about this but must are either serval pages or wont complile.

  2. #2
    martin_00
    Guest
    where did "DIR *d;" come from?

  3. #3
    martin_00
    Guest
    i was going to do this in linux. but a way that would work in linux and dos would be nice.

  4. #4
    martin_00
    Guest

    folders?

    can any one tell me how to only show folders?

  5. #5
    martin_00
    Guest
    well, the first code you gave me does work fine (thanks) in linux and windows but the second doesnt want to work in windows.
    I set the dir to C: and nothing gets listed, any ideas why?

  6. #6
    martin_00
    Guest
    im kind of new to to c and i need some kind of libarary/header reference site, any ideas? i know a couple that help with the major/standard ones, but nothing about libraries like these.

    thanks for the help

  7. #7
    martin_00
    Guest
    that site does show how to use it, but it doesnt explain alot. theres pages for things like printf and and the whole stdio.h library in books/online but what about the other functions/libraries? thats what i need, a mix between a howto and a reference book.

  8. #8
    martin_00
    Guest
    also, how could i find out what dir the program is working in. i dont see a whereami like command in io.h

  9. #9
    martin_00
    Guest
    i was just looking for a particulary good book/website. im still learning c and really cant tell the difference between a great c site and bull. if it explains it and resembles a man page i just have to assume its good. if i knew it i wouldnt be looking it up!

  10. #10
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    >i was just looking for a particulary good book/website.
    Book: The C Programming Language (K&R)
    Website: You're on it.

    -Prelude
    My best code is written with the delete key.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Following CTools
    By EstateMatt in forum C Programming
    Replies: 5
    Last Post: 06-26-2008, 11:10 AM
  2. To find the memory leaks without using any tools
    By asadullah in forum C Programming
    Replies: 2
    Last Post: 05-12-2008, 08:54 AM
  3. ordered linked list
    By redmondtab in forum C Programming
    Replies: 48
    Last Post: 10-22-2006, 07:09 AM
  4. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 01:13 AM
  5. Replies: 3
    Last Post: 03-04-2005, 02:46 PM

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