Click here to Skip to main content
15,893,161 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: ODBC classes or ADO connection Pin
Ali Rafiee22-Feb-08 5:22
Ali Rafiee22-Feb-08 5:22 
GeneralProblem with CBitmapButton Pin
john563222-Feb-08 0:32
john563222-Feb-08 0:32 
GeneralRe: Problem with CBitmapButton Pin
csc22-Feb-08 1:35
csc22-Feb-08 1:35 
AnswerRe: Problem with CBitmapButton Pin
Rajkumar R22-Feb-08 3:31
Rajkumar R22-Feb-08 3:31 
GeneralRe: Problem with CBitmapButton Pin
Hamid_RT23-Feb-08 1:34
Hamid_RT23-Feb-08 1:34 
QuestionSOCCER robot help? Pin
dopeman22-Feb-08 0:23
dopeman22-Feb-08 0:23 
AnswerRe: SOCCER robot help? Pin
CPallini22-Feb-08 0:55
mveCPallini22-Feb-08 0:55 
GeneralRe: SOCCER robot help? Pin
dopeman23-Feb-08 2:14
dopeman23-Feb-08 2:14 
Thanks for the help, really appreciate it Smile | :)

declarations:

P[0].x = 158; P[0].xi = P[0].x;
P[0].y = 100; P[0].yi = P[0].y;

i think you are right, the code below is for the player not closest to the ball and it makes it try to follow the ball.


if(P[s].close!=true)
{
if(P[s].xi<p[s].x)>
{P[s].x-=1;}
else {P[s].x+=1;}

if(P[s].yi<p[s].y)>
{P[s].y-=1;}
else {P[s].y+=1;}

}

What i dont understand is the need to compare P[s].yi<p[s].y ,="" is="" that="" the="" original="" point="" of="" orgin="" being="" compared="" to="" new="" origin="" was="" moved="" by="" a="" random="" number="" on="" both="" x="" and="" y="" axis?<br="" mode="hold">
Now as for this code:

Y[0].close=true;
p=0;
for(int n=0;n<10;n++)
{
if(Y[n].dist < Y[p].dist)
{
Y[p].close=false;
p=n;
Y[n].close=true;
}
}

I still dont get it Frown | :( The program is supposed to determine using this code which one is the closest to the shortest distance computed between the ball and the player right? so how does this compare?
GeneralError Pin
Maynka22-Feb-08 0:07
Maynka22-Feb-08 0:07 
QuestionRe: Error Pin
CPallini22-Feb-08 0:15
mveCPallini22-Feb-08 0:15 
GeneralRe: Error Pin
David Crow22-Feb-08 3:09
David Crow22-Feb-08 3:09 
GeneralAnsi libs to unicode applications Pin
neyerMat21-Feb-08 23:44
neyerMat21-Feb-08 23:44 
GeneralRe: Ansi libs to unicode applications Pin
CPallini22-Feb-08 0:00
mveCPallini22-Feb-08 0:00 
GeneralRe: Ansi libs to unicode applications Pin
neyerMat22-Feb-08 1:22
neyerMat22-Feb-08 1:22 
GeneralRe: Ansi libs to unicode applications Pin
Rajkumar R22-Feb-08 3:21
Rajkumar R22-Feb-08 3:21 
QuestionHtmlHelp with HH_DISPLAY_TEXT_POPUP in arabic language Pin
Sad0121-Feb-08 23:10
Sad0121-Feb-08 23:10 
GeneralVisual Studio 2003 installation and restart problem Pin
akira3221-Feb-08 22:59
akira3221-Feb-08 22:59 
AnswerRe: Visual Studio 2003 installation and restart problem Pin
Rajesh R Subramanian21-Feb-08 23:07
professionalRajesh R Subramanian21-Feb-08 23:07 
QuestionHow can i convert YUV4:2:2 Data To RGB ?? Pin
Soumyadipta21-Feb-08 22:34
Soumyadipta21-Feb-08 22:34 
GeneralRe: How can i convert YUV4:2:2 Data To RGB ?? Pin
CPallini21-Feb-08 22:55
mveCPallini21-Feb-08 22:55 
Generaldetermine sigma size of Gaussian mask Pin
gentleguy21-Feb-08 20:22
gentleguy21-Feb-08 20:22 
GeneralRe: determine sigma size of Gaussian mask Pin
CPallini21-Feb-08 21:20
mveCPallini21-Feb-08 21:20 
GeneralRe: determine sigma size of Gaussian mask Pin
gentleguy21-Feb-08 22:51
gentleguy21-Feb-08 22:51 
QuestionSend data to a service Pin
nitin321-Feb-08 20:03
nitin321-Feb-08 20:03 
GeneralRe: Send data to a service Pin
Matthew Faithfull21-Feb-08 22:35
Matthew Faithfull21-Feb-08 22:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.