|
Hello Mogaambo,
Is unicode defined? then use wcout instead of cout .
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
i used wcout still the problem exists.
“You will never be a leader unless you first learn to follow and be led.”
–Tiorio
"Coming together is a beginning, staying together is progress, and working together is success." Henry Ford
|
|
|
|
|
i used wchar_t this and problem solved.
“You will never be a leader unless you first learn to follow and be led.”
–Tiorio
"Coming together is a beginning, staying together is progress, and working together is success." Henry Ford
|
|
|
|
|
It would be better to use TCHAR, so that you are independant of the unicode settings. Take a look at this article[^] for extended information.
|
|
|
|
|
I have set view matrix like this:
D3DXVECTOR3 vEyePt( 0.0f, 2.0f, -3.0f );
D3DXVECTOR3 vLookatPt( 0.0f, 0.9f, 0.0f );
D3DXVECTOR3 vUpVec( 0.0f, 1.0f, 0.0f );
D3DXMATRIXA16 matView;
D3DXMatrixLookAtLH( &matView, &vEyePt, &vLookatPt, &vUpVec );
g_pd3dDevice->SetTransform( D3DTS_VIEW, &matView );
I want to retrive the eye, lookat and up vector for a purpose to change the vector.I get the eye point like this way:
D3DXMATRIXA16 m;
g_pd3dDevice->GetTransform(D3DTS_VIEW, &m);
D3DXMATRIX invm;
D3DXMatrixInverse(&invm,NULL,&m);
D3DXVECTOR3 v;
D3DXVECTOR3 cameraLoc;
v.x = 0;
v.y = 0;
v.z = 0;
D3DXVec3TransformCoord(&cameraLoc,&v,&invm);
D3DXVec3TransformCoord API get the eye vector = (0.0f, 2.0f, -3.0f ).Does anybody knows how the get the other lookat and up vector?
Thanks in advance....
Kallol
|
|
|
|
|
Hi,
I know Assert function can raise a break in Debug mode. It helps a lot.
but when it is in Release mode,the Compile ignore Aseert function. then how can I know it meets a error?
for example:
int open_file(char * filename)
{
FILE *fp;
fp=fopen(filename,"wr"); //p1
assert(fp!=NULL); //p2
//do something
//p3
}
in Debug mode:
when p1 fail, fp will be NULL and the assert will raise a break,then it exit.
in Release mode:
the Compile ignore the assert function, what should I do if fopen failed?
if it will go on running statements after p3 ?
to avoid this happend, should I have to replace all the assert statements in Release mode?
thank you.
|
|
|
|
|
You are not using the assert properly. This function should be used only to test the code. An assert should never be reached in a released product. Assert is used to detect errors in your code, not detect a file which is missing. In your case, if the file doesn't not exist you should handle the error in a better way. For instance your function could return an error code or throw an exception which has to be handled at a higher level.
|
|
|
|
|
|
China_Kevin wrote: 强烈同意楼上~~~~~
Uh, what ??
|
|
|
|
|
I am Chinese,HOHO, 强烈同意楼上~~~~~ just means I agree with you very much...
|
|
|
|
|
your name "Cedric" why your "C" is brighter than my name "China_Kevin" "C"
|
|
|
|
|
Because he is an MVP.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
|
I hereby bestow on you a "brighter" name:
China_Kevin
Carry it with honor.
"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
|
|
|
|
|
You lie to me~~~~~
That a walloping huge lie!!
|
|
|
|
|
Me too~
|
|
|
|
|
I got the idea and I known how to do it.
thank you both Luc Pattyn and Cédric Moonen~
|
|
|
|
|
why do not think me~~~~~o(∩_∩)o...哈哈
|
|
|
|
|
I concur with Cédric.
Use assert to discover logic flaws in your program while debugging, don't use it to detect exceptional circumstances, things that go wrong not because there is an error in your program, but because the circumstances are against you, as in a missing file. Hence:
#define null NULL
if (fp==null) {
} else {
}
modified on Friday, April 17, 2009 2:59 PM
|
|
|
|
|
Please no C# ing here.
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]
|
|
|
|
|
sorry, I meant NULL of course. Or ZERO, ZILCH, RIENDUTOUT, NADA, NIENTE, whatever you fancy.
|
|
|
|
|
Well I see you agree with me (and Rajesh, I suppose): C/C++ 's NULL is more imperative than C# cheap fake one.
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]
|
|
|
|
|
Hear hear...
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Hi All,
i have one win32 exe and after executing it, in the task manager the memory usage is increasing even there is nothing to process for exe.At the starting its size is 150kb but it is increasing up to 10 mb. so please can anyone tell me the possible reasons and solutions.
Thanks A Ton
Ash_VCPP
walking over water is just knowing where the stones are.....
|
|
|
|
|
you have memory leak.
check your program that every new function match a delete function.
remember to release every resource you have got.
|
|
|
|