|
not sure right now about the winmain part it looks correct.
The DirectXExample has to be a registered class name when you pass it to CreateWindow, it's not just some text you specify.
from MSDN:
lpClassName:
Pointer to a null-terminated string or a class atom created by a previous call to the RegisterClass or RegisterClassEx function.<br> The atom must be in the low-order word of lpClassName; the high-order word must be zero.<br> If lpClassName is a string, it specifies the window class name. The class name can be any name registered with RegisterClass or RegisterClassEx,<br> provided that the module that registers the class is also the module that creates the window. <br>The class name can also be any of the predefined system class names. <br>For a list of system class names, see the Remarks section.
|
|
|
|
|
Gindi Bar Yahav wrote: Error 2 error C2065: '“DirectXExample”' : undeclared identifier c:\users\יהב\documents\visual studio 2008\projects\learningdirectx\learningdirectx\winmain.cpp 56 LearningDirectX
It looks like you're using some abnormal quotation marks around your string constant; make sure you're using regular quotes and not smart quotes. Aside from that, make sure you're not compiling the program as UNICODE (unless you want to change your WinMain function to _tWinMain and wrap all your string constants with the TEXT(...) macro.)
|
|
|
|
|
Thanks!! you solved me the problem.
i clicked properties and the "charset" was unicode, so i changed to multy-byte charcters (its ok?) but now its compiling me with no error, now i can go back to learn, thanks.
Gindi Bar Yahav - Web & Software defeloper.
|
|
|
|
|
|
|
|
|
|
jeron1 suggested a very good article, indeed.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I didn't I rated his post, however that is not my problem
(if you read my question) my issue is I need something such as BitConverter (in c#) in c/c++
|
|
|
|
|
Your question looks actually arising from a endianess problem; I doubt that a BitConverter -like class would be of any help.
Probably if you elaborate it a bit then we might properly appreciate your issue.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
CPallini wrote: Your question looks actually arising from a endianess problem; I doubt that a BitConverter-like class would be of any help.
Probably if you elaborate it a bit then we might properly appreciate your issue.
? like the question suggests I have converted it from big endian to little, but as stated I cannot just read straight into a double now, i must first grab the data into a char[], convert from big to small, then what I am left with is a char[] filled with binary data.. i need to convert from binary data into a double,int,or float... I could write my own function that would use the mantissa and all that for the float, but I don't think it should be that much trouble and there has to be an easier way of doing it
|
|
|
|
|
Greg Mort wrote: ...what I am left with is a char[] filled with binary data.. i need to convert from binary data into a double,int,or float...
Would a union work?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
I have seen a few implementations of unions with similar threads, I however seem not to be able to get it to work, then again I have never used unions before
|
|
|
|
|
Never heard about union s?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
|
Greg Mort wrote: you cant read can you?
Yes, I'm able to (as a proof I can see a typo in your sentence... ).
Good luck with your reversed char[] and float .
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
This is C++, you don't even need a union , you could just type-pun it directly, from a char[] to a double* or float* or whatever you want. The union isn't any better with Unidefined Behaviour here, only one member of the union is required to have a value at any one time - so it's just as bad as pointer-wise type-punning. Both methods should work anyway.
|
|
|
|
|
Thank you, I just figured this out as well
|
|
|
|
|
|
Looks like an endianess issue.
|
|
|
|
|
I agree, so how to I grab it from a file, reorder the data, and place the value in a double variable?
|
|
|
|
|
Maybe this[^] article will help.
|
|
|
|
|
Please look at the following lines of code.
<br />
PULONG count;<br />
PLUID* sessions;<br />
<br />
LsaEnumerateLogonSessions(count, sessions);<br />
I got the following error on that..
<br />
error C3861: 'LsaEnumerateLogonSessions': identifier not found, even with argument-dependent lookup<br />
Any idea why it's happen there in the code?
Thanks a lot
I appreciate your help all the time...
CodingLover
|
|
|
|
|
Are you sure you're including the correct headers?
|
|
|
|