Our website uses cookies to enhance your browsing experience.
Accept
to the top
>
>
>
C++

Posts: C++ articles

Feb 01 2012
Wade not in unknown waters. Part two
Andrey Karpov
This time I want to speak on the 'printf' function. Everybody has heard of software vulnerabilities and that functions like 'printf' are outlaw. But it's one thing to know that you'd better not...
...
Jan 27 2012
Wade not in unknown waters. Part one
Andrey Karpov
We decided to write several small posts on how C/C++ programmers play with fire without knowing it. The first post will be devoted to an attempt to explicitly call a...
...
Subscribe to the newsletter
Want to receive a monthly digest of the most interesting articles and news? Subscribe!
Jan 23 2012
Confusion of WPARAM with UINT, and LPARAM with LONG
Andrey Karpov
A great deal of compilation errors occurring when trying to recompile a 32-bit Windows application for 64-bit systems is related to inccorect function arguments. You may often see that in user...
...
Jan 23 2012
Warning C4267 in the expression unsigned n = str.find(substr)
Andrey Karpov
When porting 32-bit code on a 64-bit system, Visual C++ compiler may generate a lot of warnings C4267 for the code where the result of the function std::string::find() is saved into a variable of...
...
Jan 23 2012
Are the types size_t and uintptr_t equivalent?
Andrey Karpov
The question if these types are equivalent and which of them and when should be used is discussed very much. But in practice you may consider them equivalent and use them as you...
...
Jan 23 2012
Is there a way to make the type size_t 32-bit in a 64-bit program?
Andrey Karpov
While porting code from a 32-bit system to a 64-bit one, you may want to make the types size_t/ptrdiff_t 32-bit again to reduce the number of errors and warnings generated by the compiler. This...
...
Jan 23 2012
How can I know if the DWORD_PTR type is defined using ifdef?
Andrey Karpov
Memsize-types DWORD_PTR, INT_PTR, LONG_PTR, UINT_PTR and ULONG_PTR are intended to support 64-bit code and can safely store a pointer regardless of the platform capacity. But these types might...
...
Jan 17 2012
Overwriting memory - why?
Andrey Karpov
We decided to publish this article in our knowledge base to show programmers how easily private data can get out of the program handling them. There is the V597 diagnostic rule in PVS-Studio...
...
Dec 15 2011
How to make fewer errors at the stage of code writing. Part N4
Andrey Karpov
This is the fourth post in which I want to share with you some useful observations on error patterns and the ways of fighting them. This time I will touch upon the subject of handling rare...
...
Nov 25 2011
PVS-Studio: analyzing Doom 3 code
Andrey Karpov
The id Software company possesses a PVS-Studio license. However, we decided to test the source codes of Doom 3 that have been recently laid out on the Internet. The result is the following...
...
View more Pagination arrow previous
Showing: - of 649