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

Subversion Repositories thor

[/] [thor/] [trunk/] [software/] [c64/] [testfiles/] [ATest.cpp] - Rev 41

Compare with Previous | Blame | View Log

 
extern int printf(char *, ...);
 
class ATest
{
public:
  int avar;
  static int masterKey;
  int MyFunc();
  int MyFunc(int a, int b);
  int (*fncptr)();
  int MyOtherFunc();
  int avarb;
  int Func3(int a,int b,int c);
  int avarc;
};
 
class ATest2 : public ATest
{
	int urvar;
	int anothor_var;
};
 
/*
int ATest::MyFunc(int g)
{
  printf("master=%d",masterKey);
  printf("Hello World!");
  printf("%d", avarc);
  Func3(avarc);
}
*/
 
int MyFunc(int a, int b)
{
  printf("a=%d",a);
  printf("b=%d",b);
}
 
int ATest::Func3(int b, int c, int d)
{
  printf("%d", b);
  printf("%d", avar);
}
 
 
int main()
{
	ATest testvar;
	ATest *p;
	ATest2 tv2;
 
	printf("%d",testvar.avar);
	testvar.MyFunc();
	testvar.MyFunc(20,30);
	testvar.MyOtherFunc();
	testvar.Func3(10,15,25);
	(*testvar.fncptr)();
	printf("%d",testvar.avarb);
	p->MyFunc();
	printf("%d",tv2.avar);
}
 
 
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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