Modern C Cheat Sheet Pdf
C 14 library features user defined literals for standard library types.
Modern c cheat sheet pdf. Based on phillip m. The example is not valid c 17 it doesn t compile on g 7 trunk. Class template argument deduction requires an initializer i think the author was trying to show a similar example to this one in the proposal which uses a variadic template. C quick reference preprocessor comment to end of line multi line comment include stdio h insert standard header file include myfile h insert file in current directory define x some text replace x with some text define f a b a b replace f 1 2 with 1 2.
Some uses for these literals include compile time integer parsing binary literals and imaginary number literals. A good knowledge base. Duxbury s c cheatsheet and edited by morten nobel jørgensen. C quick reference c cheatsheet.
C for dummies by stephen davis. The cheatsheet focus is both on the language as well as common classes from the standard library. Understanding and coding in c is easier when you know the declaration expressions and operators to perform calculations. Jul 17 2012 i thought about creating a cheatsheet for the c 11 regex library for a long time and i finally sat down and made it over the last few days.
The stl algorithm cheat sheet that i wrote on github is meant to have a very short description of each algorithm and provide 2 5 lines of example code showing how the algorithm is used and what gets modified produced as a result. A cheatsheet of modern c language and library features. Many of these descriptions and examples come from various resources see acknowledgements section summarized in my own words. New user defined literals for standard library types including new built in literals for chrono and basic string these can be constexpr meaning they can be used at compile time.
This cheat sheet covers all of these. C reference card c data types data type description bool boolean true or false char character a b etc char character array c style string if null terminated string c string from the stl int integer 1 2 1 1000 etc long int long integer float single precision floating point double double precision floating point. C for dummies cheat sheet for dummies author.