So, I've bought two books, one on DirectX 10 and one on OpenGL. The first one i bought was the directX 10 book, and NONE of the code compiled because of some LPCSTR error. So stupid me thinking it was another thing that microsoft goofed on i bought a book that teaches OpenGL. THE SAME THING HAPPENED!!! I have no clue how to fix it and i'm about done with 3D API's. What can i do? I've included all the right files and everything, I'm not sure what to do. I know it has something to do with the win32 window because i've done almost all of the video tutorials with source code on http://videotutorialsrock.com and all of it compiled beautifully. Do you know of any videos that would help me understand OpenGl in concurrency with windows? Right now i'm mainly focussed on OpenGl because i've sunk ALOT of money into it, but i would still welcome any DirectX suggestions. Thanks alot guys I really appreciate all the help you've given me.

Try changing your project options to not use unicode.

LPCSTR = Long Pointer to a C-style STRing
C = char *

Microsoft typedefs their actual types, and if your project options are set to use unicode a different typedef is used for supporting unicode.

(it may be LPCWSTR)

You can read the first few pages of a book on Windows programming and it will probably tell you all about their naming system.

The "Long Pointer" part is outdated, pointers long ago were different.

Actually, to correct pseudorandom21: LPCSTR stands for Long Pointer to a Constant STRing.
So LPCSTR indicates that the pointer is a const char* NOT a char* Incidentally, using the Microsoft naming conventions a char * pointer would be LPSTR !

As pseudorandom21 has correctly pointed out, you may need to use LPCWSTR if you're using unicode in your project.

Another thing to bear in mind is that the C in LPCSTR and LPCWSTR stands for constant. i.e. These are pointers to constant strings. So if you're getting error messages saying things like 'cannot convert const char* to char*' or 'cannot convert char* to const char*' then you may need to take a look at how you're using and/or storing the strings in question!

However as you haven't posted the exact errors you're getting regarding the LPCSTR's this is all conjecture! If you'd post some snippets of relevant code and some of the errors you're getting, somebody may be able to offer further help on this!

Thanks, didn't know that.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.