Like I said in the OP. Like those codes in the input file.
Code:
class A {
int a[11],x,y,z;
char *oneString;
public:
A() { oneString= new char[100]; }
˜A() { delete oneString; }
void f();
};
void A::f() {
int temp;
x=y+1;
z=x+2; z= x*x;
}
Code:
int sum(int a,int b) { return a+b; }
void main()
{
int i,x1,x2,r; int a[11];
for(i=1;i<=10;i++) a[i]=0;
x1=2; x2=10;
a[1]= x1*x2;
r= sum(x1,x2);
}
The output would be like this.
class
A
int
a
x
y
z
char
oneString
public
new
delete
void
f
temp
It just lists it like this. I'm guessing your code in #4 would just do that, if you just add the open file and create an output file.