C and C++ Programming Tips

Welcome to Cprogramming.com's repository or tips for programming in C and C++. Peruse the archives or add your own tips for others to use!

Sort by clicking on any of the headers.

TipAuthorRating (votes)
Use const variables as function parameters when pobeyonddc 5.9
Be careful about array size when u are using strcpBhushan Verma 6.5
Better enumsBrent 8.7
Assigning a char array to another char arrayBrian Plummer 6.3
Long variable namesCarl 8.1
gets is dangerouscarl johnson 8.2
Check the return value of scanf( )citizen 5.4
Use makefilecjediknight 6.1
take advantage of array indiciesDave 5.6
Standard Loop ProgressionDazzle 6.9
static member functions and this pointerdhruv shekhawat 7.0
Use preincrement with iteratorsDirk Tjantele 6.2
Understanding the Principal of Referenced Object & Referencing Object.Eddy Wu 0.0
Reference to Array of Function Pointer.Eddy Wu 0.0
Effective use of ==Er.Nathan 6.4
Fastest raise to power.Ezzetabi 6.1
.c is used for c while .cpp is used for c++G.P. 5.9
Don't modify a variable more than once in a single statementGanga R Jaiswal 5.3
Rounding to an IntegerGorn 7.5
Display Date and Time in C++Govind 7.7
Temporariless SwapGuille 7.4
Test pieces of your code earlyHardi Pertel 6.0
LogicHardi Pertel 6.5
increase 1 without using +-*/henry zhang 0.0
C++ is not a pure Object Oriented Language..Hridesh Vishwdewa 6.6
Never return a non-const pointer to a data member!hussain hani 3.0
beware of loop invarinatsIain 5.7
Private type in public class scopeIgor 0.0
Avoid stl set non-const iteratorsIgor 8.4
Passing a pointer to a functionIrfaan Kamo 7.6

Next 30
Previous 30

Help your fellow programmers! Add a tip!