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 4.9
Be careful about array size when u are using strcpBhushan Verma 5.3
Better enumsBrent 5.3
Assigning a char array to another char arrayBrian Plummer 3.1
Long variable namesCarl 5.5
gets is dangerouscarl johnson 5.3
Check the return value of scanf( )citizen 2.9
Use makefilecjediknight 5.6
take advantage of array indiciesDave 5.5
Standard Loop ProgressionDazzle 5.7
static member functions and this pointerdhruv shekhawat 2.2
Use preincrement with iteratorsDirk Tjantele 1.9
Understanding the Principal of Referenced Object & Referencing Object.Eddy Wu 1.0
Reference to Array of Function Pointer.Eddy Wu 1.0
Effective use of ==Er.Nathan 3.3
Fastest raise to power.Ezzetabi 5.6
.c is used for c while .cpp is used for c++G.P. 3.9
Don't modify a variable more than once in a single statementGanga R Jaiswal 4.4
Rounding to an IntegerGorn 5.7
Display Date and Time in C++Govind 5.7
Temporariless SwapGuille 5.6
Test pieces of your code earlyHardi Pertel 5.6
LogicHardi Pertel 5.7
increase 1 without using +-*/henry zhang 0.0
C++ is not a pure Object Oriented Language..Hridesh Vishwdewa 5.5
Never return a non-const pointer to a data member!hussain hani 2.6
beware of loop invarinatsIain 5.7
Private type in public class scopeIgor 1.0
Avoid stl set non-const iteratorsIgor 4.7
Passing a pointer to a functionIrfaan Kamo 5.3

Next 30
Previous 30

Help your fellow programmers! Add a tip!