Click here to Skip to main content
15,799,019 members

Comments by Sauro Viti (Top 197 by date)

Sauro Viti 18-Jun-13 4:21am View    
TCHAR is always the best choice as it make your application Unicode-aware.
It is just a typedef that translate to char when _UNICODE is not defined and to WCHAR otherwise.
To use the TCHAR datatype you should include the tchar.h header.
Sauro Viti 29-Jan-11 17:03pm View    
Reason for my vote of 5
Useful trick!
Sauro Viti 25-Jan-11 4:31am View    
"It is not wise to throw exception" - Really? It's strange because the C++ standard say the opposite, and the exception handling is considered an important and required feature of modern object-oriented programming languages.

Obviously, if you are writing software for an embedded platform, with limited resources or with very strict constraints about performances, you could be right (but probably you won't use C++, but plain C instead).

Generally speaking, the little overhead of the exception handling is not perceptible and doesn't affect the application performances; then using exceptions give you the chance to write code which is easier to write, to maintain and that others could better understand.
Sauro Viti 21-Dec-10 16:48pm View    
Ah ah ah! Good idea! But google has already done it!
Sauro Viti 1-Dec-10 15:41pm View    
I updated my answer to make clear how the scalar and vectorial products are used in the angle evaluation. I hope it's understandable now :-)