vc++ 의 cout 가 왜 오류가날까요?

jyj9782의 이미지

아래 구문정도의 코드가 왜 오류가날까요 ?

vc++ 에서요..

#include <iostream.h> 라고 적었길래.. 찾아보니까 iostream 만적길래
그렇게 했고요.. 나머지는 별게 없어보이는데, 왜 컴파일하면 오류가날까요?

해보시고 좀 답글주시겠어요.. 여러분..

#include <iostream>
using namespace std;

int main() 
{

    cout << "Hello Glossary" << endl;

    return 0;
}

답변기다릴께요

beta의 이미지

에러 메시지가 뭔가요? vc++ 6.0 노패치버젼인데 전 잘 됩니다만....

발 담갔다. 이제 익숙해 지는길만이..

jyj9782의 이미지

--------------------Configuration: t - Win32 Debug--------------------
Compiling...
t.c
c:\program files\microsoft visual studio\vc98\include\eh.h(32) : fatal error C1189: #error : "eh.h is only for C++!"
Error executing cl.exe.

t.exe - 1 error(s), 0 warning(s)

------ 에러구문있는부분은요

#ifndef __cplusplus
#error "eh.h is only for C++!"
#endif

이거에요.. eh.h 헤드파일에.. 저런구문이 걸리네요..
저걸 주석처리하니까 오류가 몇백개씩 =.=;;;

어떻하죠

힘내세요.

ifyou의 이미지

확장자 때문이 아닌가요?

cupper의 이미지

저도 잘 모르지만... ^^;;

stl은 c++에서 지원되는 기능입니다.

:oops:

jyj9782의 이미지

확장자 때문은 아니었어요..둘다 해봤거든요 c cpp

힘내세요.

cupper의 이미지

jyj9782 wrote:
확장자 때문은 아니었어요..둘다 해봤거든요 c cpp

확장자 문제 인게 확실한거 같은데요.

새로 프로젝트를 만들거나, 확장자를 수정한 뒤 "ReBuild All" 을 해보시기 바랍니다.

beta의 이미지

--------------------Configuration: test - Win32 Debug--------------------
Compiling...
test.c
c:\program files\microsoft visual studio\vc98\include\eh.h(32) : fatal error C1189: #error : "eh.h is only for C++!"
Error executing cl.exe.

test.exe - 1 error(s), 0 warning(s)

확장자를 test.c 로 바꾸니 님과 같은 에러가 나는군요. eh.h is only for C++!

관련된 파일을 모두 지우시고 첨부터 한번 해 보시지요.
꾸벅.

발 담갔다. 이제 익숙해 지는길만이..

jyj9782의 이미지

고마워요..그런듯하네요.. c 로된 확장자로 인해서.. 생성된 파일들로 영향을받아 컴파일이 제대로 안된거네요.. 고마워요 ^^

힘내세요.

댓글 달기

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
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.