전역변수로 사용하던

float m_vStartPoint3D[3] = {0.0f, 0.0f, 0.0f};

float m_vEndPoint3D[3] = {0.0f, 0.0f, 0.0f};

 

이런 형태를

Class 하여

 

{

public:

float m_vStartPoint3D[3];

float m_vEndPoint3D[3];

.

.

.

}

 

생성자

{

m_vStartPoint3D[3] = {0.0f, 0.0f, 0.0f};

m_vEndPoint3D[3] = {0.0f, 0.0f, 0.0f};

.

.

.

}

형태로 바꾸었다.그런데 Error 발생

 

1>.\SourceFiles\AAA.cpp(18) : error C2059: syntax error : '{'

1>.\SourceFiles\AAA.cpp(18) : error C2143: syntax error : missing ';' before '{'

1>.\SourceFiles\AAA.cpp(18) : error C2143: syntax error : missing ';' before '}'

1>.\SourceFiles\AAA.cpp(19) : error C2059: syntax error : '{'

1>.\SourceFiles\AAA.cpp(19) : error C2143: syntax error : missing ';' before '{'

1>.\SourceFiles\AAA.cpp(19) : error C2143: syntax error : missing ';' before '}'

 

해결방법은 {0.0f, 0.0f, 0.0f} -> (0.0f, 0.0f, 0.0f) 형태로 바꿔준다.

'Programming > Visual Studio' 카테고리의 다른 글

error LNK2005:  (0) 2010.01.13
error LNK1104  (1) 2010.01.13
error LNK2019 fatal, error LNK1120  (0) 2010.01.13
VisualStudio 메모리 누수 체크 사용하기  (0) 2009.12.19
error LNK2005: 에러  (0) 2009.12.19
Posted by 시그v

블로그 이미지
Computer graphics & Programming
시그v

공지사항

Yesterday
Today
Total

달력

 « |  » 2024.4
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30

최근에 올라온 글

최근에 받은 트랙백

최근에 달린 댓글

믹시