Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
snippets:c:start [2011/05/25 21:14] – codebrainz | snippets:c:start [2011/06/13 17:39] (current) – replace tag index list by nspages list enrico | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ==== Snippets for the C and C++ Programming Language | + | ====== Collection of Snippets for C ====== |
- | | + | Longer, more elaborate Snippets are described in sub-pages list below. |
+ | |||
+ | <nspages -title -simplelist -exclude: | ||
+ | |||
+ | ====== Structures ====== | ||
+ | |||
+ | |||
+ | The following two snippets will insert a '' | ||
+ | |||
+ | < | ||
+ | _ts=typedef struct\n{\n\t\n}\n%cursor%; | ||
+ | _s=struct %cursor%\n{\n\t\n}; | ||
+ | </ | ||
+ | |||
+ | The respective insertions are: | ||
+ | < | ||
+ | typedef struct | ||
+ | { | ||
+ | |||
+ | } | ||
+ | /* CursorGoesHere */; | ||
+ | </ | ||
+ | <code c> | ||
+ | struct /* CursorGoesHere */ | ||
+ | { | ||
+ | |||
+ | }; | ||
+ | </ | ||
+ | |||
+ | The cursor will be placed where ''/ | ||
+ | |||
+ | ====== Main function ====== | ||
+ | |||
+ | This snippet inserts a '' | ||
+ | |||
+ | < | ||
+ | _m=int main(int argc, char *argv[])\n{\n\treturn 0;\n}\n | ||
+ | </ | ||
+ | |||
+ | This snippet results in the insertion: | ||
+ | |||
+ | <code c> | ||
+ | int main(int argc, char *argv[]) | ||
+ | { | ||
+ | /* CursorGoesHere */ | ||
+ | return 0; | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | The cursor will be placed where ''/ | ||
+ | |||
+ | {{tag> |