Question:

Why doesn't this Direct X code compile?

by  |  earlier

0 LIKES UnLike

I'm trying to follow this tutorial http://www.directxtutorial.com/Tutorial9/B-Direct3DBasics/dx9B1.aspx#still

(The entire code is at the bottom of the page above the blue "box" and you have to press view code"

But I am getting these errors when I try to compile it.

C:\Documents and Settings\*user*\Desktop\GWLP\GWLP CONFIG\DirectX\main.cpp(39) : error C2440: '=' : cannot convert from 'unsigned short [12]' to 'const char *'

Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

C:\Documents and Settings\*user*\Desktop\GWLP\GWLP CONFIG\DirectX\main.cpp(52) : error C2664: 'CreateWindowExA' : cannot convert parameter 2 from 'unsigned short [12]' to 'const char *'

Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

Why is this?

 Tags:

   Report

1 ANSWERS


  1.     hWnd = CreateWindowEx(NULL,

                              L"WindowClass",

                              L"Our First Direct3D Program", //it doesnt like this line. be sure you typed it correctly.

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.