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

Next 30
Previous 30

Help your fellow programmers! Add a tip!