Leser: 1
![]() |
|< 1 2 3 4 >| | ![]() |
33 Einträge, 4 Seiten |
Quote... damit haben mein Vater und ich damals meiner Mutter ein Weihnachten versaut ;-)
Quote... heraushängen zu lassen, was ich schon alles gemacht hab
Quote... damit haben mein Vater und ich damals meiner Mutter ein Weihnachten versaut ;-)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
typedef int(*mycb)(bool);
int counter(bool reset = false)
{
static int c = 0;
if(reset) c=0;
return c++;
}
mycb x = counter;
printf("%i\n", (x)(false));
printf("%i\n", (x)(false));
printf("%i\n", (x)(true));
1
2
3
4
5
6
7
int a = 0;
{
printf("a = %i\n", a);
a++;
int b = 0;
}
// printf("b = %i\n", b); //b out of scope
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <stdio.h>
typedef struct tagNewPrint
{
char *p1;
tagNewPrint(char* a) : p1(a) { }
void operator()(char* x) { printf("%s, %s!\n", p1, x); }
} NewPrint;
int main()
{
NewPrint h("Howdy");
NewPrint g("Greetings");
h("world");
g("earthlings");
return 0;
}
![]() |
|< 1 2 3 4 >| | ![]() |
33 Einträge, 4 Seiten |