Jump to content

  • Log In with Google      Sign In   
  • Create Account

Weid errors


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 noatom   Members   -  Reputation: 785

Like
0Likes
Like

Posted 22 August 2012 - 12:16 PM

First there is a mistake in the title: Weird not weid,sorry I can't edit it.
Ok so I have these files: Vertex.h,Quad.h,Quad.cpp,T.h,T.cpp.

In the T files there is a problem.

Here's the definition of all files:

Vertex.h:
[source lang="cpp"]#ifndef VERTEX_H#define VERTEX_Hstruct Vertex{ Vertex(){} Vertex(float x, float y, float z, float nx, float ny, float nz, float u, float v) : pos(x,y,z), normal(nx,ny,nz), texC(u,v){} D3DXVECTOR3 pos; D3DXVECTOR3 normal; D3DXVECTOR2 texC;};#endif // VERTEX_H[/source]

Quad.h

[source lang="cpp"]#ifndef QUAD_H#define QUAD_H#include "d3dUtil.h"// Builds a quad in xz-plane.class Quad{public: Quad(); ~Quad(); void init(ID3D10Device* device, DWORD m, DWORD n, float dx); void draw();private: DWORD mNumRows; DWORD mNumCols; DWORD mNumVertices; DWORD mNumFaces; ID3D10Device* md3dDevice; ID3D10Buffer* mVB; ID3D10Buffer* mIB;};#endif // QUAD_H[/source]

Quad.cpp:

[source lang="cpp"]#include "Quad.h"#include "Vertex.h"Quad::Quad(): mNumVertices(0), mNumFaces(0), md3dDevice(0), mVB(0), mIB(0){}Quad::~Quad(){ ReleaseCOM(mVB); ReleaseCOM(mIB);}void Quad::init(ID3D10Device* device, DWORD m, DWORD n, float dx){ md3dDevice = device; mNumRows = m; mNumCols = n; mNumVertices = m*n; mNumFaces = (m-1)*(n-1)*2; // Create the geometry and fill the vertex buffer. std::vector<Vertex> vertices(mNumVertices); float halfWidth = (n-1)*dx*0.5f; float halfDepth = (m-1)*dx*0.5f; float du = 1.0f / (n-1); float dv = 1.0f / (m-1); for(DWORD i = 0; i < m; ++i) { float z = halfDepth - i*dx; for(DWORD j = 0; j < n; ++j) { float x = -halfWidth + j*dx; vertices[i*n+j].pos = D3DXVECTOR3(x, 0.0f, z); vertices[i*n+j].normal = D3DXVECTOR3(0.0f, 1.0f, 0.0f); // Stretch texture over grid. vertices[i*n+j].texC.x = j*du; vertices[i*n+j].texC.y = i*dv; } } D3D10_BUFFER_DESC vbd; vbd.Usage = D3D10_USAGE_IMMUTABLE; vbd.ByteWidth = sizeof(Vertex) * mNumVertices; vbd.BindFlags = D3D10_BIND_VERTEX_BUFFER; vbd.CPUAccessFlags = 0; vbd.MiscFlags = 0; D3D10_SUBRESOURCE_DATA vinitData; vinitData.pSysMem = &vertices[0]; HR(md3dDevice->CreateBuffer(&vbd, &vinitData, &mVB)); // Create the index buffer. std::vector<DWORD> indices(mNumFaces*3); // 3 indices per face // Iterate over each quad and compute indices. int k = 0; for(DWORD i = 0; i < m-1; ++i) { for(DWORD j = 0; j < n-1; ++j) { indices[k] = i*n+j; indices[k+1] = i*n+j+1; indices[k+2] = (i+1)*n+j; indices[k+3] = (i+1)*n+j; indices[k+4] = i*n+j+1; indices[k+5] = (i+1)*n+j+1; k += 6; // next quad } } D3D10_BUFFER_DESC ibd; ibd.Usage = D3D10_USAGE_IMMUTABLE; ibd.ByteWidth = sizeof(DWORD) * mNumFaces*3; ibd.BindFlags = D3D10_BIND_INDEX_BUFFER; ibd.CPUAccessFlags = 0; ibd.MiscFlags = 0; D3D10_SUBRESOURCE_DATA iinitData; iinitData.pSysMem = &indices[0]; HR(md3dDevice->CreateBuffer(&ibd, &iinitData, &mIB));}void Quad::draw(){ UINT stride = sizeof(Vertex); UINT offset = 0; md3dDevice->IASetVertexBuffers(0, 1, &mVB, &stride, &offset); md3dDevice->IASetIndexBuffer(mIB, DXGI_FORMAT_R32_UINT, 0); md3dDevice->DrawIndexed(mNumFaces*3, 0, 0);}[/source]

T.h:

[source lang="cpp"]#include "d3dUtil.h"class T{public: T(); ~T(); void Init(ID3D10Device* device); void draw();private: ID3D10Device* md3dDevice; ID3D10Buffer* mVB; ID3D10Buffer* mIB;}[/source]

T.cpp:

[source lang="cpp"]#include "Vertex.h"#include "T.h"T::T(): mIB(0),mVB(0),md3dDevice(0){}T::~T(){ ReleaseCOM(mIB); ReleaseCOM(mVB);}void T::Init(ID3D10Device* device){ md3dDevice = device; DWORD x; x = 19; // Create the geometry and fill the vertex buffer. // std::vector<Vertex> vertices(x); vertices[0].normal = D3DXVECTOR3(0.0f,1.0f,0.0f); vertices[0].pos = D3DXVECTOR3(1.0f,0.0f,1.0f); vertices[0].texC.x = 0.6f; vertices[0].texC.y = 1.0f; vertices[1].normal = D3DXVECTOR3(0.0f,1.0f,0.0f); vertices[1].pos = D3DXVECTOR3(-1.0f,0.0f,1.0f); vertices[1].texC.x = 0.4f; vertices[1].texC.y = 1.0f; vertices[2].normal = D3DXVECTOR3(0.0f,1.0f,0.0f); vertices[2].pos = D3DXVECTOR3(1.0f,1.0f,1.0f); vertices[2].texC.x = 0.6f; vertices[2].texC.y = 0.9f; vertices[3].normal = D3DXVECTOR3(0.0f,1.0f,0.0f); vertices[3].pos = D3DXVECTOR3(-1.0f,1.0f,1.0f); vertices[3].texC.x = 0.4f; vertices[3].texC.y = 0.9f; vertices[4].normal = D3DXVECTOR3(0.0f,1.0f,0.0f); vertices[4].pos = D3DXVECTOR3(1.0f,2.0f,1.0f); vertices[4].texC.x = 0.6f; vertices[4].texC.y = 0.8f; vertices[5].normal = D3DXVECTOR3(0.0f,1.0f,0.0f); vertices[5].pos = D3DXVECTOR3(-1.0f,2.0f,1.0f); vertices[5].texC.x = 0.4f; vertices[5].texC.y = 0.8f; vertices[6].normal = D3DXVECTOR3(0.0f,1.0f,0.0f); vertices[6].pos = D3DXVECTOR3(1.0f,3.0f,1.0f); vertices[6].texC.x = 0.6f; vertices[6].texC.y = 0.7f; vertices[7].normal = D3DXVECTOR3(0.0f,1.0f,0.0f); vertices[7].pos = D3DXVECTOR3(-1.0f,3.0f,1.0f); vertices[7].texC.x = 0.4f; vertices[7].texC.y = 0.7f; vertices[8].normal = D3DXVECTOR3(0.0f,1.0f,0.0f); vertices[8].pos = D3DXVECTOR3(1.0f,4.0f,1.0f); vertices[8].texC.x = 0.6f; vertices[8].texC.y = 0.6f; vertices[9].normal = D3DXVECTOR3(0.0f,1.0f,0.0f); vertices[9].pos = D3DXVECTOR3(-1.0f,4.0f,1.0f); vertices[9].texC.x = 0.4f; vertices[9].texC.y = 0.6f; vertices[10].normal = D3DXVECTOR3(0.0f,1.0f,0.0f); vertices[10].pos = D3DXVECTOR3(1.0f,5.0f,1.0f); vertices[10].texC.x = 0.6f; vertices[10].texC.y = 0.5f; vertices[11].normal = D3DXVECTOR3(0.0f,1.0f,0.0f); vertices[11].pos = D3DXVECTOR3(-1.0f,5.0f,1.0f); vertices[11].texC.x = 0.4f; vertices[11].texC.y = 0.5f; vertices[12].normal = D3DXVECTOR3(0.0f,1.0f,0.0f); vertices[12].pos = D3DXVECTOR3(3.0f,4.0f,1.0f); vertices[12].texC.x = 0.8f; vertices[12].texC.y = 0.6f; vertices[13].normal = D3DXVECTOR3(0.0f,1.0f,0.0f); vertices[13].pos = D3DXVECTOR3(5.0f,4.0f,1.0f); vertices[13].texC.x = 1.0f; vertices[13].texC.y = 0.6f; vertices[14].normal = D3DXVECTOR3(0.0f,1.0f,0.0f); vertices[14].pos = D3DXVECTOR3(3.0f,5.0f,1.0f); vertices[14].texC.x = 0.8f; vertices[14].texC.y = 0.5f; vertices[15].normal = D3DXVECTOR3(0.0f,1.0f,0.0f); vertices[15].pos = D3DXVECTOR3(5.0f,5.0f,1.0f); vertices[15].texC.x = 1.0f; vertices[15].texC.y = 0.5f; vertices[16].normal = D3DXVECTOR3(0.0f,1.0f,0.0f); vertices[16].pos = D3DXVECTOR3(-3.0f,5.0f,1.0f); vertices[16].texC.x = 0.2f; vertices[16].texC.y = 0.5f; vertices[17].normal = D3DXVECTOR3(0.0f,1.0f,0.0f); vertices[17].pos = D3DXVECTOR3(-3.0f,4.0f,1.0f); vertices[17].texC.x = 0.2f; vertices[17].texC.y = 0.6f; vertices[18].normal = D3DXVECTOR3(0.0f,1.0f,0.0f); vertices[18].pos = D3DXVECTOR3(-5.0f,5.0f,1.0f); vertices[18].texC.x = 0.0f; vertices[18].texC.y = 0.5f; vertices[18].normal = D3DXVECTOR3(0.0f,1.0f,0.0f); vertices[18].pos = D3DXVECTOR3(-5.0f,4.0f,1.0f); vertices[18].texC.x = 0.0f; vertices[18].texC.y = 0.6f;}[/source]

Here is how it works: Without those t.h and t.cpp the whole project works fine.When I added those 2 files,I get very weird errors.Keep in mind that T::Init is NEVER called! Actually the code in those files is never used,it's just there,but it gives errors at build time.

Here is the log:

[source lang="cpp"]1>------ Build started: Project: CubeMap, Configuration: Debug Win32 ------1> T.cpp1>c:\users\noatom\desktop\cubemap\vertex.h(14): error C2146: syntax error : missing ';' before identifier 'pos'1>c:\users\noatom\desktop\cubemap\vertex.h(14): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>c:\users\noatom\desktop\cubemap\vertex.h(15): error C2146: syntax error : missing ';' before identifier 'normal'1>c:\users\noatom\desktop\cubemap\vertex.h(15): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>c:\users\noatom\desktop\cubemap\vertex.h(16): error C2146: syntax error : missing ';' before identifier 'texC'1>c:\users\noatom\desktop\cubemap\vertex.h(16): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>c:\users\noatom\desktop\cubemap\vertex.h(9): error C2614: 'Vertex' : illegal member initialization: 'texC' is not a base or member1>c:\users\noatom\desktop\cubemap\vertex.h(9): error C2614: 'Vertex' : illegal member initialization: 'normal' is not a base or member1>c:\users\noatom\desktop\cubemap\vertex.h(9): error C2614: 'Vertex' : illegal member initialization: 'pos' is not a base or member1>c:\program files\microsoft directx sdk (june 2010)\include\dxgitype.h(12): warning C4005: 'DXGI_STATUS_OCCLUDED' : macro redefinition1> c:\program files\windows kits\8.0\include\shared\winerror.h(49379) : see previous definition of 'DXGI_STATUS_OCCLUDED'1>c:\program files\microsoft directx sdk (june 2010)\include\dxgitype.h(13): warning C4005: 'DXGI_STATUS_CLIPPED' : macro redefinition1> c:\program files\windows kits\8.0\include\shared\winerror.h(49388) : see previous definition of 'DXGI_STATUS_CLIPPED'1>c:\program files\microsoft directx sdk (june 2010)\include\dxgitype.h(14): warning C4005: 'DXGI_STATUS_NO_REDIRECTION' : macro redefinition1> c:\program files\windows kits\8.0\include\shared\winerror.h(49397) : see previous definition of 'DXGI_STATUS_NO_REDIRECTION'1>c:\program files\microsoft directx sdk (june 2010)\include\dxgitype.h(15): warning C4005: 'DXGI_STATUS_NO_DESKTOP_ACCESS' : macro redefinition1> c:\program files\windows kits\8.0\include\shared\winerror.h(49406) : see previous definition of 'DXGI_STATUS_NO_DESKTOP_ACCESS'1>c:\program files\microsoft directx sdk (june 2010)\include\dxgitype.h(16): warning C4005: 'DXGI_STATUS_GRAPHICS_VIDPN_SOURCE_IN_USE' : macro redefinition1> c:\program files\windows kits\8.0\include\shared\winerror.h(49415) : see previous definition of 'DXGI_STATUS_GRAPHICS_VIDPN_SOURCE_IN_USE'1>c:\program files\microsoft directx sdk (june 2010)\include\dxgitype.h(17): warning C4005: 'DXGI_STATUS_MODE_CHANGED' : macro redefinition1> c:\program files\windows kits\8.0\include\shared\winerror.h(49424) : see previous definition of 'DXGI_STATUS_MODE_CHANGED'1>c:\program files\microsoft directx sdk (june 2010)\include\dxgitype.h(18): warning C4005: 'DXGI_STATUS_MODE_CHANGE_IN_PROGRESS' : macro redefinition1> c:\program files\windows kits\8.0\include\shared\winerror.h(49433) : see previous definition of 'DXGI_STATUS_MODE_CHANGE_IN_PROGRESS'1>c:\program files\microsoft directx sdk (june 2010)\include\dxgitype.h(21): warning C4005: 'DXGI_ERROR_INVALID_CALL' : macro redefinition1> c:\program files\windows kits\8.0\include\shared\winerror.h(49448) : see previous definition of 'DXGI_ERROR_INVALID_CALL'1>c:\program files\microsoft directx sdk (june 2010)\include\dxgitype.h(22): warning C4005: 'DXGI_ERROR_NOT_FOUND' : macro redefinition1> c:\program files\windows kits\8.0\include\shared\winerror.h(49457) : see previous definition of 'DXGI_ERROR_NOT_FOUND'1>c:\program files\microsoft directx sdk (june 2010)\include\dxgitype.h(23): warning C4005: 'DXGI_ERROR_MORE_DATA' : macro redefinition1> c:\program files\windows kits\8.0\include\shared\winerror.h(49466) : see previous definition of 'DXGI_ERROR_MORE_DATA'1>c:\program files\microsoft directx sdk (june 2010)\include\dxgitype.h(24): warning C4005: 'DXGI_ERROR_UNSUPPORTED' : macro redefinition1> c:\program files\windows kits\8.0\include\shared\winerror.h(49475) : see previous definition of 'DXGI_ERROR_UNSUPPORTED'1>c:\program files\microsoft directx sdk (june 2010)\include\dxgitype.h(25): warning C4005: 'DXGI_ERROR_DEVICE_REMOVED' : macro redefinition1> c:\program files\windows kits\8.0\include\shared\winerror.h(49484) : see previous definition of 'DXGI_ERROR_DEVICE_REMOVED'1>c:\program files\microsoft directx sdk (june 2010)\include\dxgitype.h(26): warning C4005: 'DXGI_ERROR_DEVICE_HUNG' : macro redefinition1> c:\program files\windows kits\8.0\include\shared\winerror.h(49493) : see previous definition of 'DXGI_ERROR_DEVICE_HUNG'1>c:\program files\microsoft directx sdk (june 2010)\include\dxgitype.h(27): warning C4005: 'DXGI_ERROR_DEVICE_RESET' : macro redefinition1> c:\program files\windows kits\8.0\include\shared\winerror.h(49503) : see previous definition of 'DXGI_ERROR_DEVICE_RESET'1>c:\program files\microsoft directx sdk (june 2010)\include\dxgitype.h(28): warning C4005: 'DXGI_ERROR_WAS_STILL_DRAWING' : macro redefinition1> c:\program files\windows kits\8.0\include\shared\winerror.h(49512) : see previous definition of 'DXGI_ERROR_WAS_STILL_DRAWING'1>c:\program files\microsoft directx sdk (june 2010)\include\dxgitype.h(29): warning C4005: 'DXGI_ERROR_FRAME_STATISTICS_DISJOINT' : macro redefinition1> c:\program files\windows kits\8.0\include\shared\winerror.h(49522) : see previous definition of 'DXGI_ERROR_FRAME_STATISTICS_DISJOINT'1>c:\program files\microsoft directx sdk (june 2010)\include\dxgitype.h(30): warning C4005: 'DXGI_ERROR_GRAPHICS_VIDPN_SOURCE_IN_USE' : macro redefinition1> c:\program files\windows kits\8.0\include\shared\winerror.h(49531) : see previous definition of 'DXGI_ERROR_GRAPHICS_VIDPN_SOURCE_IN_USE'1>c:\program files\microsoft directx sdk (june 2010)\include\dxgitype.h(31): warning C4005: 'DXGI_ERROR_DRIVER_INTERNAL_ERROR' : macro redefinition1> c:\program files\windows kits\8.0\include\shared\winerror.h(49541) : see previous definition of 'DXGI_ERROR_DRIVER_INTERNAL_ERROR'1>c:\program files\microsoft directx sdk (june 2010)\include\dxgitype.h(32): warning C4005: 'DXGI_ERROR_NONEXCLUSIVE' : macro redefinition1> c:\program files\windows kits\8.0\include\shared\winerror.h(49550) : see previous definition of 'DXGI_ERROR_NONEXCLUSIVE'1>c:\program files\microsoft directx sdk (june 2010)\include\dxgitype.h(33): warning C4005: 'DXGI_ERROR_NOT_CURRENTLY_AVAILABLE' : macro redefinition1> c:\program files\windows kits\8.0\include\shared\winerror.h(49559) : see previous definition of 'DXGI_ERROR_NOT_CURRENTLY_AVAILABLE'1>c:\program files\microsoft directx sdk (june 2010)\include\dxgitype.h(34): warning C4005: 'DXGI_ERROR_REMOTE_CLIENT_DISCONNECTED' : macro redefinition1> c:\program files\windows kits\8.0\include\shared\winerror.h(49569) : see previous definition of 'DXGI_ERROR_REMOTE_CLIENT_DISCONNECTED'1>c:\program files\microsoft directx sdk (june 2010)\include\dxgitype.h(35): warning C4005: 'DXGI_ERROR_REMOTE_OUTOFMEMORY' : macro redefinition1> c:\program files\windows kits\8.0\include\shared\winerror.h(49578) : see previous definition of 'DXGI_ERROR_REMOTE_OUTOFMEMORY'1>c:\program files\microsoft directx sdk (june 2010)\include\d3d10.h(608): warning C4005: 'D3D10_ERROR_TOO_MANY_UNIQUE_STATE_OBJECTS' : macro redefinition1> c:\program files\windows kits\8.0\include\shared\winerror.h(49723) : see previous definition of 'D3D10_ERROR_TOO_MANY_UNIQUE_STATE_OBJECTS'1>c:\program files\microsoft directx sdk (june 2010)\include\d3d10.h(609): warning C4005: 'D3D10_ERROR_FILE_NOT_FOUND' : macro redefinition1> c:\program files\windows kits\8.0\include\shared\winerror.h(49732) : see previous definition of 'D3D10_ERROR_FILE_NOT_FOUND'1>c:\users\noatom\desktop\cubemap .cpp(5): error C2533: 'T::{ctor}' : constructors not allowed a return type1>c:\users\noatom\desktop\cubemap .cpp(25): error C2039: 'normal' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(26): error C2039: 'pos' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(27): error C2039: 'texC' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(27): error C2228: left of '.x' must have class/struct/union1>c:\users\noatom\desktop\cubemap .cpp(28): error C2039: 'texC' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(28): error C2228: left of '.y' must have class/struct/union1>c:\users\noatom\desktop\cubemap .cpp(30): error C2039: 'normal' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(31): error C2039: 'pos' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(32): error C2039: 'texC' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(32): error C2228: left of '.x' must have class/struct/union1>c:\users\noatom\desktop\cubemap .cpp(33): error C2039: 'texC' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(33): error C2228: left of '.y' must have class/struct/union1>c:\users\noatom\desktop\cubemap .cpp(35): error C2039: 'normal' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(36): error C2039: 'pos' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(37): error C2039: 'texC' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(37): error C2228: left of '.x' must have class/struct/union1>c:\users\noatom\desktop\cubemap .cpp(38): error C2039: 'texC' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(38): error C2228: left of '.y' must have class/struct/union1>c:\users\noatom\desktop\cubemap .cpp(40): error C2039: 'normal' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(41): error C2039: 'pos' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(42): error C2039: 'texC' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(42): error C2228: left of '.x' must have class/struct/union1>c:\users\noatom\desktop\cubemap .cpp(43): error C2039: 'texC' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(43): error C2228: left of '.y' must have class/struct/union1>c:\users\noatom\desktop\cubemap .cpp(45): error C2039: 'normal' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(46): error C2039: 'pos' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(47): error C2039: 'texC' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(47): error C2228: left of '.x' must have class/struct/union1>c:\users\noatom\desktop\cubemap .cpp(48): error C2039: 'texC' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(48): error C2228: left of '.y' must have class/struct/union1>c:\users\noatom\desktop\cubemap .cpp(50): error C2039: 'normal' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(51): error C2039: 'pos' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(52): error C2039: 'texC' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(52): error C2228: left of '.x' must have class/struct/union1>c:\users\noatom\desktop\cubemap .cpp(53): error C2039: 'texC' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(53): error C2228: left of '.y' must have class/struct/union1>c:\users\noatom\desktop\cubemap .cpp(55): error C2039: 'normal' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(56): error C2039: 'pos' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(57): error C2039: 'texC' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(57): error C2228: left of '.x' must have class/struct/union1>c:\users\noatom\desktop\cubemap .cpp(58): error C2039: 'texC' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(58): error C2228: left of '.y' must have class/struct/union1>c:\users\noatom\desktop\cubemap .cpp(60): error C2039: 'normal' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(61): error C2039: 'pos' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(62): error C2039: 'texC' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(62): error C2228: left of '.x' must have class/struct/union1>c:\users\noatom\desktop\cubemap .cpp(63): error C2039: 'texC' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(63): error C2228: left of '.y' must have class/struct/union1>c:\users\noatom\desktop\cubemap .cpp(65): error C2039: 'normal' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(66): error C2039: 'pos' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(67): error C2039: 'texC' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(67): error C2228: left of '.x' must have class/struct/union1>c:\users\noatom\desktop\cubemap .cpp(68): error C2039: 'texC' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(68): error C2228: left of '.y' must have class/struct/union1>c:\users\noatom\desktop\cubemap .cpp(70): error C2039: 'normal' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(71): error C2039: 'pos' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(72): error C2039: 'texC' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(72): error C2228: left of '.x' must have class/struct/union1>c:\users\noatom\desktop\cubemap .cpp(73): error C2039: 'texC' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(73): error C2228: left of '.y' must have class/struct/union1>c:\users\noatom\desktop\cubemap .cpp(75): error C2039: 'normal' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(76): error C2039: 'pos' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(77): error C2039: 'texC' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(77): error C2228: left of '.x' must have class/struct/union1>c:\users\noatom\desktop\cubemap .cpp(78): error C2039: 'texC' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(78): error C2228: left of '.y' must have class/struct/union1>c:\users\noatom\desktop\cubemap .cpp(80): error C2039: 'normal' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(81): error C2039: 'pos' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(82): error C2039: 'texC' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(82): error C2228: left of '.x' must have class/struct/union1>c:\users\noatom\desktop\cubemap .cpp(83): error C2039: 'texC' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(83): error C2228: left of '.y' must have class/struct/union1>c:\users\noatom\desktop\cubemap .cpp(85): error C2039: 'normal' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(86): error C2039: 'pos' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(87): error C2039: 'texC' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(87): error C2228: left of '.x' must have class/struct/union1>c:\users\noatom\desktop\cubemap .cpp(88): error C2039: 'texC' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(88): error C2228: left of '.y' must have class/struct/union1>c:\users\noatom\desktop\cubemap .cpp(90): error C2039: 'normal' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(91): error C2039: 'pos' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(92): error C2039: 'texC' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(92): error C2228: left of '.x' must have class/struct/union1>c:\users\noatom\desktop\cubemap .cpp(93): error C2039: 'texC' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(93): error C2228: left of '.y' must have class/struct/union1>c:\users\noatom\desktop\cubemap .cpp(95): error C2039: 'normal' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(96): error C2039: 'pos' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(97): error C2039: 'texC' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(97): error C2228: left of '.x' must have class/struct/union1>c:\users\noatom\desktop\cubemap .cpp(98): error C2039: 'texC' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(98): error C2228: left of '.y' must have class/struct/union1>c:\users\noatom\desktop\cubemap .cpp(100): error C2039: 'normal' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(101): error C2039: 'pos' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(102): error C2039: 'texC' : is not a member of 'Vertex'1> c:\users\noatom\desktop\cubemap\vertex.h(7) : see declaration of 'Vertex'1>c:\users\noatom\desktop\cubemap .cpp(102): error C2228: left of '.x' must have class/struct/union1>c:\users\noatom\desktop\cubemap .cpp(102): fatal error C1003: error count exceeds 100; stopping compilation1> Generating Code...1> Compiling...1> Box.cpp1>c:\program files\microsoft directx sdk (june 2010)\include\dxgitype.h(12): warning C4005: 'DXGI_STATUS_OCCLUDED' : macro redefinition1> c:\program files\windows kits\8.0\include\shared\winerror.h(49379) : see previous definition of 'DXGI_STATUS_OCCLUDED'1>c:\program files\microsoft directx sdk (june 2010)\include\dxgitype.h(13): warning C4005: 'DXGI_STATUS_CLIPPED' : macro redefinition1> c:\program files\windows kits\8.0\include\shared\winerror.h(49388) : see previous definition of 'DXGI_STATUS_CLIPPED'1>c:\program files\microsoft directx sdk (june 2010)\include\dxgitype.h(14): warning C4005: 'DXGI_STATUS_NO_REDIRECTION' : macro redefinition1> c:\program files\windows kits\8.0\include\shared\winerror.h(49397) : see previous definition of 'DXGI_STATUS_NO_REDIRECTION'1>c:\program files\microsoft directx sdk (june 2010)\include\dxgitype.h(15): warning C4005: 'DXGI_STATUS_NO_DESKTOP_ACCESS' : macro redefinition1> c:\program files\windows kits\8.0\include\shared\winerror.h(49406) : see previous definition of 'DXGI_STATUS_NO_DESKTOP_ACCESS'1>c:\program files\microsoft directx sdk (june 2010)\include\dxgitype.h(16): warning C4005: 'DXGI_STATUS_GRAPHICS_VIDPN_SOURCE_IN_USE' : macro redefinition1> c:\program files\windows kits\8.0\include\shared\winerror.h(49415) : see previous definition of 'DXGI_STATUS_GRAPHICS_VIDPN_SOURCE_IN_USE'1>c:\program files\microsoft directx sdk (june 2010)\include\dxgitype.h(17): warning C4005: 'DXGI_STATUS_MODE_CHANGED' : macro redefinition1> c:\program files\windows kits\8.0\include\shared\winerror.h(49424) : see previous definition of 'DXGI_STATUS_MODE_CHANGED'1>c:\program files\microsoft directx sdk (june 2010)\include\dxgitype.h(18): warning C4005: 'DXGI_STATUS_MODE_CHANGE_IN_PROGRESS' : macro redefinition1> c:\program files\windows kits\8.0\include\shared\winerror.h(49433) : see previous definition of 'DXGI_STATUS_MODE_CHANGE_IN_PROGRESS'1>c:\program files\microsoft directx sdk (june 2010)\include\dxgitype.h(21): warning C4005: 'DXGI_ERROR_INVALID_CALL' : macro redefinition1> c:\program files\windows kits\8.0\include\shared\winerror.h(49448) : see previous definition of 'DXGI_ERROR_INVALID_CALL'1>c:\program files\microsoft directx sdk (june 2010)\include\dxgitype.h(22): warning C4005: 'DXGI_ERROR_NOT_FOUND' : macro redefinition1> c:\program files\windows kits\8.0\include\shared\winerror.h(49457) : see previous definition of 'DXGI_ERROR_NOT_FOUND'1>c:\program files\microsoft directx sdk (june 2010)\include\dxgitype.h(23): warning C4005: 'DXGI_ERROR_MORE_DATA' : macro redefinition1> c:\program files\windows kits\8.0\include\shared\winerror.h(49466) : see previous definition of 'DXGI_ERROR_MORE_DATA'1>c:\program files\microsoft directx sdk (june 2010)\include\dxgitype.h(24): warning C4005: 'DXGI_ERROR_UNSUPPORTED' : macro redefinition1> c:\program files\windows kits\8.0\include\shared\winerror.h(49475) : see previous definition of 'DXGI_ERROR_UNSUPPORTED'1>c:\program files\microsoft directx sdk (june 2010)\include\dxgitype.h(25): warning C4005: 'DXGI_ERROR_DEVICE_REMOVED' : macro redefinition1> c:\program files\windows kits\8.0\include\shared\winerror.h(49484) : see previous definition of 'DXGI_ERROR_DEVICE_REMOVED'1>c:\program files\microsoft directx sdk (june 2010)\include\dxgitype.h(26): warning C4005: 'DXGI_ERROR_DEVICE_HUNG' : macro redefinition1> c:\program files\windows kits\8.0\include\shared\winerror.h(49493) : see previous definition of 'DXGI_ERROR_DEVICE_HUNG'1>c:\program files\microsoft directx sdk (june 2010)\include\dxgitype.h(27): warning C4005: 'DXGI_ERROR_DEVICE_RESET' : macro redefinition1> c:\program files\windows kits\8.0\include\shared\winerror.h(49503) : see previous definition of 'DXGI_ERROR_DEVICE_RESET'1>c:\program files\microsoft directx sdk (june 2010)\include\dxgitype.h(28): warning C4005: 'DXGI_ERROR_WAS_STILL_DRAWING' : macro redefinition1> c:\program files\windows kits\8.0\include\shared\winerror.h(49512) : see previous definition of 'DXGI_ERROR_WAS_STILL_DRAWING'1>c:\program files\microsoft directx sdk (june 2010)\include\dxgitype.h(29): warning C4005: 'DXGI_ERROR_FRAME_STATISTICS_DISJOINT' : macro redefinition1> c:\program files\windows kits\8.0\include\shared\winerror.h(49522) : see previous definition of 'DXGI_ERROR_FRAME_STATISTICS_DISJOINT'1>c:\program files\microsoft directx sdk (june 2010)\include\dxgitype.h(30): warning C4005: 'DXGI_ERROR_GRAPHICS_VIDPN_SOURCE_IN_USE' : macro redefinition1> c:\program files\windows kits\8.0\include\shared\winerror.h(49531) : see previous definition of 'DXGI_ERROR_GRAPHICS_VIDPN_SOURCE_IN_USE'1>c:\program files\microsoft directx sdk (june 2010)\include\dxgitype.h(31): warning C4005: 'DXGI_ERROR_DRIVER_INTERNAL_ERROR' : macro redefinition1> c:\program files\windows kits\8.0\include\shared\winerror.h(49541) : see previous definition of 'DXGI_ERROR_DRIVER_INTERNAL_ERROR'1>c:\program files\microsoft directx sdk (june 2010)\include\dxgitype.h(32): warning C4005: 'DXGI_ERROR_NONEXCLUSIVE' : macro redefinition1> c:\program files\windows kits\8.0\include\shared\winerror.h(49550) : see previous definition of 'DXGI_ERROR_NONEXCLUSIVE'1>c:\program files\microsoft directx sdk (june 2010)\include\dxgitype.h(33): warning C4005: 'DXGI_ERROR_NOT_CURRENTLY_AVAILABLE' : macro redefinition1> c:\program files\windows kits\8.0\include\shared\winerror.h(49559) : see previous definition of 'DXGI_ERROR_NOT_CURRENTLY_AVAILABLE'1>c:\program files\microsoft directx sdk (june 2010)\include\dxgitype.h(34): warning C4005: 'DXGI_ERROR_REMOTE_CLIENT_DISCONNECTED' : macro redefinition1> c:\program files\windows kits\8.0\include\shared\winerror.h(49569) : see previous definition of 'DXGI_ERROR_REMOTE_CLIENT_DISCONNECTED'1>c:\program files\microsoft directx sdk (june 2010)\include\dxgitype.h(35): warning C4005: 'DXGI_ERROR_REMOTE_OUTOFMEMORY' : macro redefinition1> c:\program files\windows kits\8.0\include\shared\winerror.h(49578) : see previous definition of 'DXGI_ERROR_REMOTE_OUTOFMEMORY'1>c:\program files\microsoft directx sdk (june 2010)\include\d3d10.h(608): warning C4005: 'D3D10_ERROR_TOO_MANY_UNIQUE_STATE_OBJECTS' : macro redefinition1> c:\program files\windows kits\8.0\include\shared\winerror.h(49723) : see previous definition of 'D3D10_ERROR_TOO_MANY_UNIQUE_STATE_OBJECTS'1>c:\program files\microsoft directx sdk (june 2010)\include\d3d10.h(609): warning C4005: 'D3D10_ERROR_FILE_NOT_FOUND' : macro redefinition1> c:\program files\windows kits\8.0\include\shared\winerror.h(49732) : see previous definition of 'D3D10_ERROR_FILE_NOT_FOUND'1> Generating Code...1> Skipping... (no relevant changes detected)1> Sphere.cpp1> Quad.cpp1> Cylinder.cpp1> Cube Map Demo.cpp========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========[/source]

Edited by noatom, 22 August 2012 - 12:20 PM.


Sponsor:

#2 SiCrane   Moderators   -  Reputation: 9676

Like
1Likes
Like

Posted 22 August 2012 - 12:20 PM

You forgot a semi-colon at the end of your T class definition.

#3 noatom   Members   -  Reputation: 785

Like
0Likes
Like

Posted 22 August 2012 - 01:43 PM

well...that was unexpected:) I actually searched for a mistake like that,never found it.Anyway,Thanks a lot!

#4 Bacterius   Crossbones+   -  Reputation: 9305

Like
0Likes
Like

Posted 22 August 2012 - 03:12 PM

well...that was unexpected:) I actually searched for a mistake like that,never found it.Anyway,Thanks a lot!

Well it is kind of like looking for a typo in a large wall of text, you just never see it until someone points it out to you Posted Image When you see these types of errors you will get the hang of immediately checking your syntax (since C++ isn't exactly known for telling you when you forget a semicolon or a brace but instead prefers to bomb you with compiler errors).

The slowsort algorithm is a perfect illustration of the multiply and surrender paradigm, which is perhaps the single most important paradigm in the development of reluctant algorithms. The basic multiply and surrender strategy consists in replacing the problem at hand by two or more subproblems, each slightly simpler than the original, and continue multiplying subproblems and subsubproblems recursively in this fashion as long as possible. At some point the subproblems will all become so simple that their solution can no longer be postponed, and we will have to surrender. Experience shows that, in most cases, by the time this point is reached the total work will be substantially higher than what could have been wasted by a more direct approach.

 

- Pessimal Algorithms and Simplexity Analysis





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS