씨언어 오류좀 고쳐주시겠습니까?

seojh1431의 이미지

#include "stdio.h"
#include "string.h"
#include "dos.h"
#include "stdlib.h"
#include "io.h" //FILE_SEARCH file_search;
#include "direct.h" //getcwd

typedef struct _finddata_t FILE_SEARCH;

#define _CRT_SECURE_NO_WARNINGS
#define MAXPATH 80
#define ALL_ATTRIB (FA_RDONLY || FA_HIDDEN || FA_SYSTEM || FA_LABEL || FA_DIREC || FA_ARCH); // 여기 정의 해두었는데 왜 선언되지 않은 식별자라고 오류가 뜨는겁니까??
/* 모든 속성을 지정 */

void fileListPrint(char *path, FILE_SEARCH *file_search);

struct ffblk {
char ff_reserved[21]; /* reserved by DOS */
char ff_attrib; /* attribute found */
int ff_ftime; /* file time */
int ff_fdate; /* file date */
long ff_fsize; /* file size */
char ff_name[13]; /* found file name */
};

/*/////////////////////////////////////////////////////////////////////////

FUNCTION void findfile (char *mask)
PURPOSE Processes messages for the main window.
COMMENTS
인자로 파일 마스크를 받아 전 디렉토리를 뒤져서
파일 마스크에 일치하는 파일을 화면으로 출력한다.
현재의 디렉토리에서 파일을 다 찾았으면 서브 디렉토리로 추적해
다시 파일을 찾는 과정을 반복하다가 서브 디렉토리를 다 찾으면
다시 상위 디렉토리로 돌아오는 재귀적 과정을 되풀이 한다.
/////////////////////////////////////////////////////////////////////////*/

void main(int argc, char *argv[])
{
FILE_SEARCH file_search; // FILE_SEARCH 구조체 변수 file_search 선언! #include
char buf[20]={0,};
if(argc != 2) // argc가 2가 아니라면/
{
printf("Usage : %s \n", argv[0]);
exit(0); // #include
}
// buf[0]='\\';
// strcpy();
fileListPrint(argv[1], &file_search); // 파일 경로, 파일정보 인자 전달
// argv[1] : 파일 경로
// &file_search : 파일 정보


}

void fileListPrint (char *path, FILE_SEARCH *file_search)
{
char buf[512]; /* 현재 경로를 저장할 공간 */
long h_file=0L;
struct ffblk info;
int countFile=0;
if((h_file = _findfirst(buf, file_search)) == -1L) //
printf("파일이 존재하지 않습니다!\n");


if (_findfirst(path, info, ALL_ATTRIB) == 0) // 여기서 오류가 납니다
{
do {
getcwd(path, MAXPATH); /* 현재의 경로를 얻음 */

printf ("\nTEST MASK [%d] : [%s]", countFile++, path); /* TEST */

printf ("\n%s%s%s\n", path, /* 출력 : 현재의 경로 + (\) + 파일명 */
strlen(path) == 3 ? "" : "\\", info.ff_name);
/* root \ sub */
} while(_findnext(h_file , info.ff_fdate) == 0); // <-----------특히 이부분에서 잘 모르겠네요..
}

}

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.