![]() |
#2
不要脸的猫2013-04-24 11:14
|

#include <iostream>
using namespace std;
class tnode
{
private:
char *tword;
int count;
public:
tnode(char o[],int p)
{
tword = o;
count = p;
}
void out()
{
cout <<count<<endl;
}
void xout()
{
for(int i = 0 ; i < 10 ; i++)
{
cout << *tword +i <<endl;
};
}
};
void main()
{
char x[10] = {"roor"};
tnode io(x,6);
io.out();
io.xout();
}
using namespace std;
class tnode
{
private:
char *tword;
int count;
public:
tnode(char o[],int p)
{
tword = o;
count = p;
}
void out()
{
cout <<count<<endl;
}
void xout()
{
for(int i = 0 ; i < 10 ; i++)
{
cout << *tword +i <<endl;
};
}
};
void main()
{
char x[10] = {"roor"};
tnode io(x,6);
io.out();
io.xout();
}