Thread: Read subdirectiories problem

  1. #1
    Registered User
    Join Date
    Jun 2002

    Question Read subdirectiories problem


    I am attempting to write a c++ program to read all of the subdirectories withing a directory. I'm rather new to this so I'm having a great deal of difficulty.

    For some reason it keeps reading the current directory name.

    I keep comparing mine with the example at:

    I followed it pretty close.

    I can't figure out what is wrong after a whole afternoon of research. I'm sure its something real simple I missed.

    Could someone help. I've attached my cpp file.
    " . . . and I lay awake, big dreamers never sleep." - David Lee Roth

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    > if((sHand = _findfirst(curPath, &findStruct)) == -1L)

    if((sHand = _findfirst("*.*", &findStruct)) == -1L)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem of read file in C++
    By rosicky2005 in forum C++ Programming
    Replies: 3
    Last Post: 11-27-2006, 05:25 AM
  2. Replies: 3
    Last Post: 03-04-2005, 02:46 PM
  3. data read problem
    By Supra in forum C Programming
    Replies: 0
    Last Post: 02-03-2002, 07:02 PM
  4. problem with output
    By Garfield in forum C Programming
    Replies: 2
    Last Post: 11-18-2001, 08:34 PM
  5. Uh-oh! I am having a major switch problem!
    By goodn in forum C Programming
    Replies: 4
    Last Post: 11-01-2001, 04:49 PM