pgming-life / study-code

MIT License
0 stars 0 forks source link

Error on 0017_String #2

Open vmx17 opened 1 year ago

vmx17 commented 1 year ago

Hi! Thank you for your nice DirectX11 tutorials. I'm now traceing it in VisualStudio 2022. As title says, The study-code/directx11/0017_String/main.cpp around line 646-647, g_fontText.push_back(&FontText()) returns error saying ""&" requires l-value". Then I changed the line to;

for (auto it = g_fontFlag.begin(); it != g_fontFlag.end(); ++it)
{
    FontText* ft = new FontText();
    g_fontText.push_back(ft);
}

but got result as below. Yes, the zenkaku fonts did not appear. Do you have any idea? 0017 And the code returns some warnings like;

C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\dxgitype.h(12,1): warning C4005: 'DXGI_STATUS_OCCLUDED': macro redefinition
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\shared\winerror.h(58064,1): message : see previous definition of 'DXGI_STATUS_OCCLUDED'
1>C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\dxgitype.h(13,1): warning C4005: 'DXGI_STATUS_CLIPPED': macro redefinition
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\shared\winerror.h(58073,1): message : see previous definition of 'DXGI_STATUS_CLIPPED'
1>C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\dxgitype.h(14,1): warning C4005: 'DXGI_STATUS_NO_REDIRECTION': macro redefinition
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\shared\winerror.h(58082,1): message : see previous definition of 'DXGI_STATUS_NO_REDIRECTION'
1>C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\dxgitype.h(15,1): warning C4005: 'DXGI_STATUS_NO_DESKTOP_ACCESS': macro redefinition
...
vmx17 commented 1 year ago

As for many warnings, I could remove them with same way as you commented in 0015.