Modern C Cheat Sheet Pdf
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.
Modern c cheat sheet pdf. A cheatsheet of modern c language and library features. The example is not valid c 17 it doesn t compile on g 7 trunk. The cheatsheet focus is both on the language as well as common classes from the standard library. Modern c language and library features.
Based on phillip m. In case you haven t encountered them regular expressions are a powerful way of searching and manipulating strings. 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. C for dummies by stephen davis.
Understanding and coding in c is easier when you know the declaration expressions and operators to perform calculations. 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. A good knowledge base. Duxbury s c cheatsheet and edited by morten nobel jørgensen.
Some uses for these literals include compile time integer parsing binary literals and imaginary number literals. C for dummies cheat sheet for dummies author. 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. 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 goal is to give a concise overview of basic modern c c 14. Many of these descriptions and examples come from various resources see acknowledgements section summarized in my own words. 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.