The first thing, what I would like to tell you is:
You should explain the problem at the beginning and not at the end.
I looked at the beginning and saw something, which looked like there would be much work to do and this without any loan.
And there are many listings. Maybe this is only one part: the beginning? For the big end, he would need somebody, who does it?
Coud be, that peopple think so, before they read the end. Maybe they don't read until end?
This could have been a reason, that you didn't get a reply besides me.
Clearner88 wrote:
i am unable to get 12 values of x and y coordinates |
1 2 3 4 5 6 7 8 9 10 11
|
void Cross::setCord()
{
for(int i=0;i<12;i++)
{
cout<<"Please enter x-cordinate of pt."<<i+1;
cin>>x;
cout<<"Please enter y-cordinate of pt."<<i+1;
cin>>y;
}
}
|
I'm unable too. Can't imagine, how to get out 12 valueas from one single variable?
Clearner88 wrote:
May i know the way of solving this? and is there a way that i can use a class array? |
There are many ways, how to do something.
If you normally use classes for i,j,x,y, then I assume, that you also would like to use a class for an array.
But if you normally use normal variables, then you should also use normal arrays.
Clearner88 wrote:
i want to try something new. |
And I'm shure, that this isn't something new. There is no money to earn. A pity, people discovered this already before. And this I can show you, by using also this now discovered and unhidden secret:
1 2 3 4 5 6 7
|
for(int i=0;i<12;i++)
{
cout<<"Please enter x-cordinate of pt."<<i+1;
cin>>x[i];
cout<<"Please enter y-cordinate of pt."<<i+1;
cin>>y[i];
}
|