This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| int main(int argc, char *argv[]) | |
| { | |
| FILE *f; | |
| char op; | |
| int a, b; | |
| scanf("%c %d %d", &op, &a, &b); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| int main(int argc, char *argv[]) | |
| { | |
| FILE *f; | |
| char op; | |
| int a, b; | |
| scanf("%c %d %d", &op, &a, &b); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| int main(int argc, char *argv[]) | |
| { | |
| int a_bunch_of_ints[100]; | |
| int kind_of_like_a_pointer; | |
| a_bunch_of_ints[2] = 76; | |
| a_bunch_of_ints[9] = 42; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| int main(int argc, char *argv[]) | |
| { | |
| int a_bunch_of_ints[100]; | |
| int *pointer_a; | |
| int *pointer_b; | |
| pointer_a = &a_bunch_of_ints[2]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| int main(int argc, char *argv[]) | |
| { | |
| int a = 42; | |
| printf("a is %d\n", a); | |
| printf("The address of a is %p\n", &a); | |
| exit(0); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| int main(int argc, char *argv[]) | |
| { | |
| int a = 42; | |
| int *b = &a; /* b contains the address of a. */ | |
| int **c = &b; /* c contains the address of b. */ | |
| printf("a is %d\n", **c); /* prints 42 -- *c would print b, **c prints a. */ | |
| exit(0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <curses.h> | |
| #include <iostream> | |
| #include <string> | |
| std::string myfunc() | |
| { | |
| std::string result = "Hello, World!"; | |
| return result; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <map> | |
| #include <iostream> | |
| #include <string> | |
| using namespace std; | |
| int main() { | |
| // A map | |
| map<string, int> a_map; | |
| // Put some things in it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <algorithm> | |
| #include <iostream> | |
| using namespace std; | |
| class Slime { | |
| public: | |
| int n; | |
| // Constructor is a method with the same name as the class and | |
| // no return type (it doesn't return anything). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| " vi:set sts=2 sw=2 ai: | |
| let &runtimepath = pathogen#surround(expand("<sfile>:p:h") . "/.homesick/repos/eraserhd/vimfiles") . "," . &runtimepath | |
| call pathogen#infect() | |
| filetype plugin indent on | |
| set number | |
| set nocompatible bs=2 ai viminfo='20,\"50 modelines=2 | |
| set foldmethod=marker nobackup writebackup | |
| set switchbuf=usetab |