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)
Commenting out code with the preprocessorWebmaster 5.7
Common Optimization TipsTravis Fischer 6.9
Comparisons in C\C++Nikitas Angelinas 7.4
compiler tipJulian Sutherland 6.2
Compiling 32-bit code on a 64-bit machinevinay Kumar 5.2
Convert String to SYSTEMTIMESaddam Abu Ghaida 1.0
Converting numbers to StringsWebmaster 6.8
Copy constructorAli Nawkhas Murad 7.5
Count number of bits in an integer.Anjani Kumar Mishra 8.2
creating a messagebox on WindowsAmarjeet Kawathe 6.1
Cute but dangerous code, finding the larger integer without using comparisonsPrakash Samy 3.0
Declaration of abstract class in c++Ali Nawkhas Murad 8.1
decoding * and inc/dec operator combos like *++p , *p-- ,etckishore 0.0
Decompose before you codeAbhinandan Pandey 6.3
Determining if something was processed in a switch/case constructMarty Corbett 4.3
difference between float and doubleankit panwar 8.2
difference between int* p and int *p declarationomprakash mishra 7.1
Differences between class and structAli Nawkhas Murad 7.9
Display Date and Time in C++Govind 7.7
Do NOT always check for NULL! (C++)Kevin Lam 6.1
do not use printf without %s to print a stringpavan kumar 7.6
Doing calculationsLinuxguru 5.5
Don't increment the same variable multiple times in one statementsidra 3.0
Don't modify a variable more than once in a single statementGanga R Jaiswal 5.3
Don't use fflush(stdin)Shakti 5.6
Don't use strlen in a loop condition.anonytmouse 7.4
Dont't use scanf() when reading sentencesRomnico 6.5
Dynamic memory allocation of 2d arraysnandam 3.7
Effective Modularity in ProgrammingSharma PCS 6.6
Effective use of ==Er.Nathan 6.4

Next 30
Previous 30

Help your fellow programmers! Add a tip!