OpenCores
URL https://opencores.org/ocsvn/thor/thor/trunk

Subversion Repositories thor

[/] [thor/] [trunk/] [software/] [c64/] [testfiles/] [ATest3.cpp] - Blame information for rev 41

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 41 robfinch
 
2
extern int printf(char *, ...);
3
 
4
class ATest
5
{
6
public:
7
  int avar;
8
  static int masterKey;
9
  int MyFunc();
10
  int MyFunc(int a, int b);
11
  int (*fncptr)();
12
  int MyOtherFunc();
13
  int avarb;
14
  int Func3(int a,int b,int c);
15
  int avarc;
16
};
17
 
18
class ATest2 : public ATest
19
{
20
        int urvar;
21
        int anothor_var;
22
};
23
 
24
int ATest::MyFunc()
25
{
26
  printf("master=%d",masterKey);
27
  printf("Hello World!");
28
  printf("%d", avarc);
29
  Func3(avarc);
30
}
31
 
32
/*
33
int MyFunc(int a, int b)
34
{
35
  printf("a=%d",a);
36
  printf("b=%d",b);
37
}
38
 
39
int ATest::Func3(int b, int c, int d)
40
{
41
  printf("%d", b);
42
  printf("%d", avar);
43
}
44
*/
45
/*
46
int main()
47
{
48
        ATest testvar;
49
        ATest *p;
50
        ATest2 tv2;
51
 
52
//      printf("%d",testvar.avar);
53
//      testvar.MyFunc();
54
//      testvar.MyFunc(20,30);
55
//      testvar.MyOtherFunc();
56
//      testvar.Func3(10,15,25);
57
//      (*testvar.fncptr)();
58
//      printf("%d",testvar.avarb);
59
//      p->MyFunc();
60
//      printf("%d",tv2.avar);
61
}
62
*/
63
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.