C ++ 공부중인데요 .. 도와주세요 opengl game programming 책 소스갖고계신분 ㅠ

아파요의 이미지

제가 얼마전에 openGL Game Programming 책을 구해서 공부를 하는데요 ㅠ

뒤에 CD 가 없어서 소스를 책보고 하는데 오류가 너무 많이 나네요 ..

누가 도와주세요 ㅠㅠ

책저자는 Hawkins ,Astle

아 추가로

#include
#include
#include
#include "Object_ha.h"
#include "Vector.h"
#include "Table_ha.h"

static float puckData[32][3] =
{{0.0, 0.01, 1.0}, {0.3827, 0.01, 0.9239}, {0.7071, 0.01, 0.7071} ,
{0.9239, 0.01, 0.3827}, {1.0, 0.01, 0.0} , { 0.9239, 0.01, -0.3827} ,
{ 0.7071, 0.01, -0.7071} , {0.3827, 0.01, -0.9239}, {0.0, 0.01, -1.0} ,
{ -0.3827, 0.01, -0.9239} ,{ -0.7071, 0.01, -0.7071}, {-0.9239, 0.01, -0.3827} ,
{ -1.0, 0.01, 0.0} , { -0.9237, 0.01, 0.3827},{ -0.7071, 0.01, 0.7071} ,
{ -0.3827, 0.01, 0.9239}, {0.0, 0.07, 1.0}, {0.3827, 0.07, 0.9239},
{ 0.7071, 0.07, 0.7071} , {0.9239, 0.07, 0.3827} , { 1.0, 0.07, 0.0},
{0.9239, 0.07, -0.3827}, { 0.7071, 0.07, -0.7071} , { 0.3827, 0.07, -0.9239},
{ 0.0, 0.07, -1.0}, { -0.3827, 0.07, -0.9239} , { -0.7071, 0.07, -0.7071},
{-0.9239, 0.07, -0.3827}, { -1.0, 0.07, 0.0} , { -0.9237, 0.07, 0.3827} ,
{ -0.7071, 0.07, 0.7071} , {-0.3827, 0.07, 0.9239}};

class CPuck : public CObject_ha
{

private:
float radius;

public:

CPuck(void);
CPuck(float);
public:
~CPuck(void);
void Load();
void Unload();
void Draw();
void Animate(scalar_t deltaTime);
void Animate(scalar_t deltaTime, CTable_ha * table);
};

이거 전역선언 하는데서

c:\program files\microsoft visual studio\myprojects\game\puck.h(25) : error C2059: syntax error : '{'

이런 오류나는데요 이유아시는분 좀 가르쳐주세요 ㅠ

ssif의 이미지

신택스 오류라고 써이쓴데요... "{" 가 어딘가에 빠져 있다고...;;

봄들판에서다

봄들판에서다

아파요의 이미지

다른 소스창에다가 싱글로실행시키면 돌아가요 -_-;

유독 여기에 삽입하믄 저렇게떠요 ;

ssif의 이미지

c:\program files\microsoft visual studio\myprojects\game\puck.h(25) 이 파일
25번째줄이라는데요....;;;;;;;;
봄들판에서다

봄들판에서다

아파요의 이미지

음..그 위치가요...요기에요
잠시만요
#include
//#include
//#include
//#include
#include
//#include
#include
#include "Object_ha.h"
#include "Vector.h"
#include "Table_ha.h"
#include "puck.h"

static double playerData[32][3] =
{ <--------------------요기
{0.0, 0.01, 0.1}, { 0.3827, 0.01, 0.9239},
{0.7071, 0.01, 0.7071},{0.9239,0.01,0.3827},{1.0,0.01,0.0},
{0.9239, 0.01,-0.3827},{0.7071,0.01,-0.7071},{0.3827,0.01,-0.9239},
{0.0,0.01,-1.0},{-0.3827,0.01,-0.9239},{-0.7071,0.01,-0.7071},
{-0.9239,0.01,-0.3827},{-0.1,0.01,0.0},{-0.9237,0.01,0.3927},
{-0.7071,0.01,0.07071},{-0.3827,0.01,0.9239},
{0.0, 0.8, 0.1}, { 0.3827, 0.8, 0.9239},
{0.7071, 0.8, 0.7071},{0.9239,0.8,0.3827},{1.0,0.8,0.0},
{0.9239, 0.8,-0.3827},{0.7071,0.8,-0.7071},{0.3827,0.8,-0.9239},
{0.0,0.8,-1.0},{-0.3827,0.8,-0.9239},{-0.7071,0.8,-0.7071},
{-0.9239,0.8,-0.3827},{-0.1,0.8,0.0},{-0.9237,0.8,0.3927},
{-0.7071,0.8,0.07071},{-0.3827,0.8,0.9239}
};

익명 사용자의 이미지

#include "Object_ha.h"
#include "Vector.h"
#include "Table_ha.h"
#include "puck.h"

이 파일중에 에러가 있을 거요.
잘 찾아보쇼.

댓글 달기

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