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

Subversion Repositories thor

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 41 robfinch
// Test the new operator
2
 
3
// These references will be non-mangled
4
 
5
int printf(char *, ...);
6
 
7
using name mangler;     // use compiler name mangling facility
8
 
9
int main(int argc, char **argv)
10
{
11
  void *obj;
12
 
13
  obj = new int[100];
14
  printf("object pointer is %p\n", obj);
15
  delete obj;
16
}
17
 
18
// Back to using non-mangled names again
19
using real names;
20
 
21
 

powered by: WebSVN 2.1.0

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