Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6546871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:45:41+00:00 2026-05-25T11:45:41+00:00

I’m working in visual studio with DirectX and today I’ve gotten some weird compiler

  • 0

I’m working in visual studio with DirectX and today I’ve gotten some weird compiler errors that don’t make any sense (to me at least)…

These are the errors I get:

error C2143: syntax error : missing ‘;’ before ‘.’
error C2059: syntax error : ‘)’

I’ve double checked my code and didn’t spot any typos/mistakes (I could be wrong…)

I’m hoping that someone can tell me what the error usually means and where to look…

I’ll put some code below with the indication of the line where the errors occur (in case you want to check)


Extra info:
m_ImTexture2D is a member struct.
Vertex.PosTex is a struct within a struct

GameManager.cpp:

(231): error C2143: syntax error : missing ';' before '.'
(231): error C2143: syntax error : missing ';' before '.'
(232): error C2143: syntax error : missing ';' before '{'
(233): error C2143: syntax error : missing ';' before '}'
(233): error C2143: syntax error : missing ';' before ','
(234): error C2143: syntax error : missing ';' before '{'
(234): error C2143: syntax error : missing ';' before '}'
(234): error C2143: syntax error : missing ';' before ','
(235): error C2143: syntax error : missing ';' before '{'
(235): error C2143: syntax error : missing ';' before '}'
(235): error C2143: syntax error : missing ';' before ','
(237): error C2143: syntax error : missing ';' before '{'
(237): error C2143: syntax error : missing ';' before '}'
(237): error C2143: syntax error : missing ';' before ','
(238): error C2143: syntax error : missing ';' before '{'
(238): error C2143: syntax error : missing ';' before '}'
(238): error C2143: syntax error : missing ';' before ','
(239): error C2143: syntax error : missing ';' before '{'
(239): error C2143: syntax error : missing ';' before '}'
(246): error C2143: syntax error : missing ')' before '.'
(246): error C2143: syntax error : missing ';' before '.'
(246): error C2143: syntax error : missing ';' before '.'
(246): error C2059: syntax error : ')'
(249): error C2065: 'vertices' : undeclared identifier

bool GameManager::GMLoadImage(Image** ppImage, const char* pkcFilePath, ImageDesc* pImDesc)
{
    (*ppImage) = new Image();

    ID3D11ShaderResourceView** ppColorMap = (*ppImage)->GetppColorMap();


/// CREATE SHADER RESOURCE VIEW (from file) ///
    HRESULT result = D3DX11CreateShaderResourceViewFromFileA(m_pDevice,
                                                             pkcFilePath,
                                                             0,
                                                             0,
                                                             ppColorMap,
                                                             0);
    if (FAILED(result)) {
        MessageBoxA(NULL,"Error loading ShaderResourceView from file","Error",MB_OK);
        return false;
    }


/// RECEIVE TEXTURE DESC ///
    ID3D11Resource* pColorTex;
    (*ppColorMap)->GetResource(&pColorTex);
    ((ID3D11Texture2D*)pColorTex)->GetDesc(&((*ppImage)->GetColorTexDesc()));
    pColorTex->Release();

/// CREATE VERTEX BUFFER ///
    D3D11_TEXTURE2D_DESC colorTexDesc = (*ppImage)->GetColorTexDesc();
    float halfWidth = static_cast<float>(colorTexDesc.Width)/2.0f;
    float halfHeight = static_cast<float>(colorTexDesc.Height)/2.0f;

/*231*/ Vertex.PosTex vertices[]=
/*232*/ {
/*233*/     {XMFLOAT3( halfWidth, halfHeight, 1.0f ),   XMFLOAT2( 1.0f, 0.0f )},
/*234*/     {XMFLOAT3( halfWidth, -halfHeight, 1.0f ),  XMFLOAT2( 1.0f, 1.0f )},
/*235*/     {XMFLOAT3( -halfWidth, -halfHeight, 1.0f ), XMFLOAT2( 0.0f, 1.0f )},
/*236*/
/*237*/     {XMFLOAT3( -halfWidth, -halfHeight, 1.0f ), XMFLOAT2( 0.0f, 1.0f )},
/*238*/     {XMFLOAT3( -halfWidth, halfHeight, 1.0f ),  XMFLOAT2( 0.0f, 0.0f )},
/*239*/     {XMFLOAT3( halfWidth, halfHeight, 1.0f ),   XMFLOAT2( 1.0f, 0.0f )}
        };

        D3D11_BUFFER_DESC vertexDesc;
        ZeroMemory(&vertexDesc,sizeof(vertexDesc));
        vertexDesc.Usage = D3D11_USAGE_DEFAULT;
        vertexDesc.BindFlags = D3D11_BIND_VERTEX_BUFFER;
/*246*/ vertexDesc.ByteWidth = sizeof(Vertex.PosTex)*6;

        D3D11_SUBRESOURCE_DATA resourceData;
/*249*/ resourceData.pSysMem = vertices;

    ID3D11Buffer** ppVBuffer = (*ppImage)->GetppVertexBuffer();
    result = m_pDevice->CreateBuffer(&vertexDesc,&resourceData,ppVBuffer);

    if (FAILED(result)) {
        MessageBoxA(NULL,"Error Creating VBuffer","Error",MB_OK);
        return false;
    }



/// SET POINTER TO IMAGEDESC
    ImageDesc** ppThisImDesc = (*ppImage)->GetppImageDesc();
    (*ppThisImDesc) = pImDesc;

    return true;
}

DxTetris.cpp:

(27): error C2143: syntax error : missing ')' before '.'
(27): error C2143: syntax error : missing ';' before '.'
(27): error C2143: syntax error : missing ';' before '.'
(27): error C2059: syntax error : ')'

bool DxTetris::LoadContent()
{
    GameManager::GMInitSingleton(m_pD3DDevice,m_pD3DContext,m_pBackBufferTarget);

    m_ImTexture2DDesc.Topology = D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST;
/*27*/m_ImTexture2DDesc.VertexSize = sizeof(Vertex.PosTex);

    //.....(code goes on)
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T11:45:42+00:00Added an answer on May 25, 2026 at 11:45 am

    In C++, the scope resolution operator is ::, not .; consequently, you need to use Vertex::PosTex rather than Vertex.PosTex.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I need a function that will clean a strings' special characters. I do NOT

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.