Ej: If I put this: = is equal, but is I put this == is another thing!
Please someone put a tutorial of those funcions.

int a;
a = 1;
int a;
int b;
a = 1;
b = a;
if (a == b)
{
// they are equal!
}
else
{
// they are not equal!
}
int a;
int b;
a = 1;
b = 2;
if (a = b)
{
// oops, now a == b
// a = 1 and b = 1, too
// because we performed assignment, not test for equality
// this is probably not what we wanted to happen
}
int a;
int b;
a = 1;
b = 2;
if (a != b)
{
// they are not equal!
}
else
{
// they are equal!
}
int a;
int b;
a = 1;
b = a;
if (a == 1 && b == 1)
{
// then a and be are both equal to 1
}
else if (a == 1 || b == 1)
{
// either a or b is equal to 1, not sure which one
}
if (varaible1==1)
{ strcpy(sing1.text, "first text");//change text effect
strcpy(sing2, "first text");
variable1=2;//the variable that I try to make change in order to alternate texts
}
if (varaible1==2)
{ strcpy(sing1, "second text");
strcpy(sing2, "second text");
varaible1=1;
}
yvelocity=-10;//draw actor effect
if (varaible1==1)
{ strcpy(sing1.text, "first text");//change text effect
strcpy(sing2, "first text");
variable1=2;//the variable that I try to make change in order to alternate texts
}
else if (varaible1==2)
{ strcpy(sing1, "second text");
strcpy(sing2, "second text");
varaible1=1;
}
yvelocity=-10;//draw actor effect
strcpy(MyActor.text,"your text here");
Users browsing this forum: No registered users and 1 guest