Turbo-C
C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
터보-C 포럼
Q & A
FAQ
팁&트릭
강좌/문서
자료실
Lua 게시판
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
볼랜드포럼 광고 모집

C/C++ Q/A
[1639] undefined simbol error
브라이언 [goldenboy] 1268 읽음    2002-11-27 15:31
이와 관련된 헤더 화일을 정의한후 다음과 같이 코딩을 하였는데
자꾸 에러가 발생하네요 (볼랜드c++ 3.1)

혹시 option에서 설정을 잘못한 것은 아닌가요?
(참고로 visualc++에서는 정상적으로 동작합니다)

error : undefined simbol _main in module c0.asm



#include "car.h"

car :: car(int destination)
{
    rand();
    dest = destination;
    forward = 1;
    position = 0;
}

int car :: steercar(void)
{
    cout<<"driving...\n";
    getch();

    if( ++position == dest)
    return 1;
    else
    return 0;
}

void car :: reversecar(void)
{
    if(forward)
    {
    cout<<"braking up\n";
    getch();
    --position ;
    forward = 0;
    }

    else
    {
    forward = 1;
    }
}

#include"PASSCAR.H"

int passcar :: pass(void)
{
    cout<<"passing ........\n";
    getch();
    position = position+2;

    if(position >=dest)
    return 1;

    else
    return 0;
}

int findobstacle(void)
{
    int r = rand();
    if(r)
    return 0;

    else
    return 1;
}

void main(void)
{
    rand();
    car2.startcar();

    while( !at_destination )
    {
        at_destination = car2.steercar();
        obstacle = findobstacle();

        if ( obstacle &&  !at_destination)
        {
            cout<<" look out! there's something in the road !n";
            getch();
            car2.brakecar();
            car2.reversecar();
            at_destination = car2.pass();
        }
    }

    cout<<"Ah, home at last \n ";
    car2.turnoffcar();
}



error : undefined simbol _main in module c0.asm

많은 노력을 해 보았지만 초보라 그런지 해결이 안되서 이렇게 글을 올립니다.
해결책을 제시해 주시면 감사하겠습니다.
꼭 좀 부탁합니다.


+ -

관련 글 리스트
1639 undefined simbol error 브라이언 1268 2002/11/27
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.