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)
pre & post increment & decrement operators jay 5.7
Clever ways to avoid using if statementsA. Karthick Pandia Samy 6.4
Decompose before you codeAbhinandan Pandey 6.5
Make pointer and reference arguments constAkshay 7.5
When optimizing code, focus on algorithms firstAlex Allain 7.1
Using _strtime and _strdate to get the timeAli Jafar 8.6
Declaration of abstract class in c++Ali Murad 7.7
What is a friend function?Ali Murad 8.0
Benefits of inline functionsAli Murad 7.6
Differences between class and structAli Murad 7.9
Copy constructorAli Murad 7.3
Benefits of a Lookup TableAli Murad 4.0
Set the most significant bit of an int Alphonse Ajayan 7.9
creating a messagebox on WindowsAmarjeet Kawathe 5.6
Count number of bits in an integer.Anjani Kumar Mishra 7.9
difference between float and doubleankit panwar 8.0
Don't use strlen in a loop condition.anonytmouse 7.3
C++ new does not return 0 on failure!Are R. Svendsen 6.7
Avoid memory wastageArthi 5.6
Member Functions are inline by default (C++)Ash 5.7
Why you can't dereference a void* pointerashish mathur 6.3
Turn off optimization when debuggingAshok Kumar 5.6
char *pa; and char a[];avdtech 5.5
Operator Associativity and HierarchyAvinash 5.9
Flowchartsayyapparaju 6.7
Code Optimization TipsBasker Swaminathan 6.4
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 0.0
Assigning a char array to another char arrayBrian Plummer 6.2

Next 30

Help your fellow programmers! Add a tip!