怎么输出的是数字而不是字母就解释啊是不是指针哪里用错了还是结构函数?
程序代码:#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();
}




