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

Next 30
Previous 30

Help your fellow programmers! Add a tip!