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

C++빌더 Q&A
C++Builder Programming Q&A
[57207] Re:헤더파일 오류가 났습니다.
HS.Soul [janghs1117] 1100 읽음    2009-06-10 17:36
흠.. 컴파일러를 어느걸 쓰시는지 모르겠지만...
mem.h 가 없다면 memory.h 로 바꿔보세요...

Visual C++ 같은 경우 mem.h 이 없는걸로 알고있거든요;


송봉준 님이 쓰신 글 :
: CWinApp theApp;
:
: #include <iostream.h>
: #include <string.h>
: ★#include <mem.h>
:
: enum boolean { false, true };
:
: class stack {
: public:
:         stack();
:         stack(int size);
:         stack(const char p[]);
:         stack(const stack& sptr);
:         ~stack() {delete []s; }
:         void clear() {top = EMPTY; }
:         void push(cha c) { s[++top] = c; }
:         char pop() { return (s[top--]; }
:         char top_of() const { return (s[top]; }
:         boolean empty() const { return (boolean) (top == EMPTY); }
:         boolean full() const {return (boolean) (top == max_len-1);}
:
: private:
:         enum {EMPTY = -1};
:         char* s;
:         int max_len;
:         int top;
: };
:
: stack::stak()
: {
: s = new char[100];
: max_len = 100;
: top = EMPTY;
: }
:
:
: stack::stack(int size)
: {
:         s = new char[size];
:         max_len = size;
:         top = EMPTY;
: }
: stack::stack(const char p[])
: {
:         max_len = strlen(p);
:
:         s=new char[max_len];
:         for (int i = 0; i< max_len && p[i] !=0; ++i)
:                 s[i] = p[i];
:         top = --i;
: }
:
: stack::stack(const stack&sptr)
: {
:         s=new char[sptr.max_len];
:         max_len = sptr.max_len;
:         top = sptr.top;
:         memcpy(s, sptr.s, max_len);
: }
:
: void main()
: {
:         stack a,b("Welcome to the C++!"), c(b), d;
:         int i;
:         char ch;
:
:         for(i=0; i<26; i++) a.push('a' + i);
:         for(i=0; i<26; i++) cout << a.pop();
:         cout << endl;
:
:         while (b.empty() != true) cout << b.pop();
:         cout << endl;
:
:         while(c.empty() !=true) {
:                 ch = c.pop();
:                 d.push(ch);
:         }
:
:         while (d.empty() !=true) cout << d.pop();
:         cout << endl;
: }
:
: ★된 부분에서 오류가 나왔습니다.
: Cannot open include file: 'mem.h': No such file or directory
: 헤더파일이 없어서 나타난거 같았는데
: 아무리 찾아봐도 헤더파일을 찾을수가 없는데...
: 어떻게 해야되나요?ㅠㅠ
: 꼭 답변 부탁드립니다ㅠㅠ

+ -

관련 글 리스트
57206 헤더파일 오류가 났습니다. 송봉준 1031 2009/06/10
57207     Re:헤더파일 오류가 났습니다. HS.Soul 1100 2009/06/10
57209         Re:Re:헤더파일 오류가 났습니다. 송봉준 920 2009/06/10
57212             Re:Re:Re:헤더파일 오류가 났습니다. 한석복.머슴 793 2009/06/11
57213                 Re:Re:Re:Re:헤더파일 오류가 났습니다. 한석복.머슴 955 2009/06/11
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.