can you help me please i got this code how will i convert this. given an address and offset i got this in cheat engine table. what is the meaning of 7D4 2B0 3C8
<Address>A9B820</Address>
<Offset>7D4</Offset>
<Offset>2B0</Offset>
<Offset>3C8</Offset>
Each point of the triangle is made up of two dots
Point A = x1,y1
Point B= x2,y2
Point C= x3,y3
like this on the pic:
Calculating the distance between these points is like:
Than finding S and P.
Now anyway when the program exe starts it should look like
Quote:
Number of Triangle you need to find S and P:
Insert data for point A
x=
y=
Insert data for point B
x=
y=
Insert data for point C
x=
y=
S= ... P =.... lala
So i need 3 values for X .... how am i going keep them separate while in structures.
I have to use structures for both point and triangle so ....it has to be somehting like
Code:
#include<iostream.h>
#include<math.h>
struct Coordinate
{
float x;
float y;
};
struct Triangle
{
Point A;
Point B;
Point C;
};
int main{
cout<<"Point A \n x="
cin>> coordinate.x;
cout<<"Point A\n y="
cin>> coordinate.y;
cout<<"Point B \n x="
cin>> coordinate.x;
cout<<"Point B\n y="
cin>> coordinate.y;
cout<<"Point C \n x="
cin>> coordinate.x;
cout<<"Point C\n y="
cin>> coordinate.y;
Triangle.PointA = {coordinate.x , coordinate.y} // the ones we input for A
Triangle.PointB = {coordinate.x , coordinate.y} // for b ....
Triangle.PointC = {coordinate.x , coordinate.y} // for c ....
---->// But how will the structures get 3 valeus for X and 3 for Y , won't it just over write them?
Side A = [img]http://img355.imageshack.us/img355/4259/image008yk1.jpg[/img]
//so on for the rest 2 sides
P = Side A + Side B + Side C
p = P/2
S = p //// heron's formula
cout<<"P=" <<P;
Cout<<"S="<< S;
return 0;
}
Something like this ... but it just wont work .... also need to input cycle with FOR for 'N' triangles ( N - unknown number that is being input upon program execution)
I have to use structures for both point and triangle so ....it has to be somehting like
Code:
#include<iostream.h>
#include<math.h>
struct Coordinate
{
float x;
float y;
};
struct Triangle
{
Point A;
Point B;
Point C;
};
int main{
cout<<"Point A \n x="
cin>> coordinate.x;
cout<<"Point A\n y="
cin>> coordinate.y;
cout<<"Point B \n x="
cin>> coordinate.x;
cout<<"Point B\n y="
cin>> coordinate.y;
cout<<"Point C \n x="
cin>> coordinate.x;
cout<<"Point C\n y="
cin>> coordinate.y;
Triangle.PointA = {coordinate.x , coordinate.y} // the ones we input for A
Triangle.PointB = {coordinate.x , coordinate.y} // for b ....
Triangle.PointC = {coordinate.x , coordinate.y} // for c ....
---->// But how will the structures get 3 valeus for X and 3 for Y , won't it just over write them?
Side A = [img]http://img355.imageshack.us/img355/4259/image008yk1.jpg[/img]
//so on for the rest 2 sides
P = Side A + Side B + Side C
p = P/2
S = p //// heron's formula
cout<<"P=" <<P;
Cout<<"S="<< S;
return 0;
}
Something like this ... but it just wont work .... also need to input cycle with FOR for 'N' triangles ( N - unknown number that is being input upon program execution)
The coffe is heating up ... let's see what am i going to do
Code:
#include<iostream.h>
#include<math.h>
struct _Coordinate
{
float x;
float y;
};
struct Triangle
{
_Coordinate A;
_Coordinate B;
_Coordinate C;
};
int main()
{
int K,i;
float S,P,p,Side_A,Side_B,Side_C;
cout<<"Number of Triangles = " ;
cin>>K;
for (i=0;i<K;i++)
{
cout<<"Coordinates regarding A="<<endl << "X = ";
cin>>Triangle.A.x;
cout<<"Coordinates regarding A="<<endl << "Y = ";
cin>>Triangle.A.y;
cout<<"Coordinates regarding B="<<endl << "X = ";
cin>>Triangle.B.x;
cout<<"Coordinates regarding B="<<endl << "Y = ";
cin>>Triangle.B.y;
cout<<"Coordinates regarding B="<<endl << "X = ";
cin>>Triangle.C.x;
cout<<"Coordinates regarding C="<<endl << "Y = ";
cin>>Triangle.C.y;
Side_A = sqrt( (Triangle.C.x*Triangle.C.x)-(2*Triangle.B.x*Triangle.C.x)+(Triangle.B.x*Triangle.B.x)+(Triangle.C.y*Triangle.C.y)-(2*Triangle.B.y*Triangle.C.y)+(Triangle.B.y*Triangle.B.y));
Side_B = sqrt( (Triangle.A.x*Triangle.A.x)-(2*Triangle.C.x*Triangle.A.x)+(Triangle.C.x*Triangle.C.x)+(Triangle.A.y*Triangle.A.y)-(2*Triangle.C.y*Triangle.A.y)+(Triangle.C.y*Triangle.C.y));
Side_C = sqrt( (Triangle.B.x*Triangle.B.x)-(2*Triangle.B.x*Triangle.A.x)+(Triangle.A.x*Triangle.A.x)+(Triangle.B.y*Triangle.B.y)-(2*Triangle.A.y*Triangle.B.y)+(Triangle.A.y*Triangle.A.y));
P = Side_A+Side_B+Side_C; //perimeter
p = P/2; //semiperimeter needed for the Heron's formula
S = sqrt(p(p-Side_A)(p-Side_B)(p-Side_C) ); //Heron's formula for finding the area
cout<<"\n The perimeter is = " <<P;
cout<<"\n The are is = " <<S;
cout<<endl;
}
return 0;
}
Cool ... it's like 19errors in the Visual C++ ... can't even understand the errors : |.The loop will work it is just that i have no idea how for example to put the outgoing data regarding each triangle , like :
Number of triangles: 7
..... data inpuiting ....
...calculations .....
output:
Triangle
1 ....
2....
3...
The coffe is heating up ... let's see what am i going to do
Code:
#include<iostream.h>
#include<math.h>
struct _Coordinate
{
float x;
float y;
};
struct Triangle
{
_Coordinate A;
_Coordinate B;
_Coordinate C;
};
int main()
{
int K,i;
float S,P,p,Side_A,Side_B,Side_C;
cout<<"Number of Triangles = " ;
cin>>K;
for (i=0;i<K;i++)
{
cout<<"Coordinates regarding A="<<endl << "X = ";
cin>>Triangle.A.x;
cout<<"Coordinates regarding A="<<endl << "Y = ";
cin>>Triangle.A.y;
cout<<"Coordinates regarding B="<<endl << "X = ";
cin>>Triangle.B.x;
cout<<"Coordinates regarding B="<<endl << "Y = ";
cin>>Triangle.B.y;
cout<<"Coordinates regarding B="<<endl << "X = ";
cin>>Triangle.C.x;
cout<<"Coordinates regarding C="<<endl << "Y = ";
cin>>Triangle.C.y;
Side_A = sqrt( (Triangle.C.x*Triangle.C.x)-(2*Triangle.B.x*Triangle.C.x)+(Triangle.B.x*Triangle.B.x)+(Triangle.C.y*Triangle.C.y)-(2*Triangle.B.y*Triangle.C.y)+(Triangle.B.y*Triangle.B.y));
Side_B = sqrt( (Triangle.A.x*Triangle.A.x)-(2*Triangle.C.x*Triangle.A.x)+(Triangle.C.x*Triangle.C.x)+(Triangle.A.y*Triangle.A.y)-(2*Triangle.C.y*Triangle.A.y)+(Triangle.C.y*Triangle.C.y));
Side_C = sqrt( (Triangle.B.x*Triangle.B.x)-(2*Triangle.B.x*Triangle.A.x)+(Triangle.A.x*Triangle.A.x)+(Triangle.B.y*Triangle.B.y)-(2*Triangle.A.y*Triangle.B.y)+(Triangle.A.y*Triangle.A.y));
P = Side_A+Side_B+Side_C; //perimeter
p = P/2; //semiperimeter needed for the Heron's formula
S = sqrt(p(p-Side_A)(p-Side_B)(p-Side_C) ); //Heron's formula for finding the area
cout<<"\n The perimeter is = " <<P;
cout<<"\n The are is = " <<S;
cout<<endl;
}
return 0;
}
Cool ... it's like 19errors in the Visual C++ ... can't even understand the errors : |.The loop will work it is just that i have no idea how for example to put the outgoing data regarding each triangle , like :
Number of triangles: 7
..... data inpuiting ....
...calculations .....
output:
Triangle
1 ....
2....
3...
Ok i should repeat it a little bit different:
"you HAVE TO declare and initalize the stuff"
Just use the struct like int or float.
Code:
Triangle nomatterwhatnamethishas =
{
0.0, 0.0, //Ax, Ay
0.0, 0.0, //Bx, By
0.0, 0.0 //Cx, Cy
};
Then you access like that:
Code:
nomatterwhatnamethishas.A.x
Or save a value:
Code:
nomatterwhatnamethishas.A.x = 10
Or use cin:
Code:
std::cin >> nomatterwhatnamethishas.A.x
But this all will only work if you declared "nomatterwhatnamethishas" before.
Without declaration and using Triangle.A.x, it will never work!
Now my teach said i'm on the right way it's just that i need to use massive ... all he gave me as hint was ... you will access the structures through the massive like
struct trio[N]
or trio[N].A.x
trio[N].A.y
.... so on .... any idea on that? -_-
Little issue 10/13/2011 - Dekaron Private Server - 4 Replies Ladies and Gentlemen, i have a little and noob Problem.
I Downloaded the Aloken server files with the Dekaronserver.exe, Dekaron.exe and the character.bak (ItsNobody database).
I placed the dekaronserver.exe in the appropriate folder inside the virtual machine.
I placed the dekaron.exe in the appropriate folder inside the A9 client.
What i should do with the character.bak? i know it is something to do into databese, but i really dont know how i should start.
Can someone tell me...
Issue with DB-Bot 07/14/2010 - SRO Private Server - 3 Replies Hello,
when I add a new skill in the bot or when I update a skill it always says: the selected item cannot be used together or the skill is already in use. But the old skill is gone in the game and in the bot but still it says that.. Really frustrating
I play on ZSZC sro...
AC/Bot issue 07/15/2008 - MapleStory - 0 Replies i have tryed many ac/bot that woked for many ppl but it doesn't for me. I download the ac/bot annd folo the intruction completly. i start up the ac/bot and then run my private server. in the server i click the hotkey but nothing happenes. it says the ac is enable but nothing happens. help me plz i'm really getting frustrated.
SV Issue 11/18/2007 - Conquer Online 2 - 7 Replies Basically after i press start sv just does nothing apart from hop around a bit now and again. On co there is a msg 'can't jump that far' dont know if that has anything to do with it. sv was working fine before, then it did this and when i tried the next day it worked for some reason, now it wont work again. fyi im using sv 1.17 with ce on patch 4356, help very much appreciated as i have tried everything including fresh co install.