1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
#include <iostream>
using namespace std;
const int numOfWords = 5;
class Sentence
{
const char * articles[]={"the","a","one","some","any"};
//const char* articles [numOfWords];
const char* noun [numOfWords];
const char* verb [numOfWords];
const char* preposition [numOfWords];
public:
Sentence()
{
const char * articles[]={"the","a","one","some","any"};
//char ** articles[]={&temp[0],&temp[1],&temp[2],&temp[3],&temp[4]};
}
void print()
{
//const char* articles[]={"the","a","one","some","any"};
cout << *articles[2];
}
};
int main ()
{
Sentence s1;
s1.print();
return 0;
}
|