C/C++ question about thrashing pointers

Page 2 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.

degibson

Golden Member
Mar 21, 2008
1,389
0
0
Originally posted by: IHateMyJob2004
...
foo = foo - 1;
...

To summarize and agree with just about everyone on this thread:

Pointer arithmetic shady at best in numeric codes, and has no place in GUIs.
 

Apathetic

Platinum Member
Dec 23, 2002
2,587
6
81
Originally posted by: Markbnj
Get a tool like PC-Lint and integrate it into your testing process, along with something like BoundsChecker. When these complacent types see what these tools produce they might have a come-to-jesus moment.

I'll second the recommendation for Lint. If you're a C/C++ programmer you NEED this tool.

Dave
 

tidehigh

Senior member
Nov 13, 2006
567
0
0
PC-Lint is the bomb.

I'm glad I work in a place where everyone questions everything. At times, it is intimidating, but no lead would ever tell me to do something because another group was doing it that way.