C++ GAMING HELP!!!SCHOOL ASSIGNMENT

 Elsino Mucka · March 24, 2015 NEED HELP!!!!!!!PLEASEI have an exercise for my school in c++(creating a game),but i have a problem it doesnt print out the guard when i m moving it.please help me.thank you#include #include #include using namespace std;int main() {    char pinakas[10][10],direction;    int k,count,random,l,dolphins=0,move;    srand(time(NULL));    //O prwtos pinakas    k=(rand()%10);    l=(rand()%10);    random=(rand()%2);    for(int i=0;i<10;i++){        for(int j=0;j<10;j++){            pinakas[j]='_';            if(k==i && j==0)pinakas[j]='G';//GIA TO GUARD                //MPOREI NA 8ELEI ORIA META TO K KAI TO l                if(random==0 && j==9){//Random gia to pou tha mpei sthn sthlh                    if(pinakas[l][j]=='S'|| pinakas[l][j]=='D')continue;                    pinakas[l][j]='S';                }                else if(random==1 && j==9){                    if(pinakas[l][j]=='S'|| pinakas[l][j]=='D')continue;                    pinakas[l][j]='D';                }            if(i<10 && j<10)            cout<>direction;        for(int i=0;i<10;i++){            for(int j=0;j<10;j++){                if(direction=='d'){//MOVEGUARD                    if(pinakas[j]=='G'){                        pinakas[j]='_';                        int hold=i+1;                        cout<

Replies

 Abdirasaq Ali · March 27, 2015 XNA so simple so easy it was love at first sight, then I did understand other developing tools  been 2 yrs since I programmed something. Samuel Palace · March 26, 2015 Ohhhh XNA, my one true love, it's been forever. Abdirasaq Ali · March 26, 2015 Your making a game in C++, I'mm guessing ur using XNA for the ide like I did last year, correct? Dol Lod · March 25, 2015 To get the code to work somewhat better,you have to always create the post and then edit it, inserting the code.It is cut off right now. Elsino Mucka · March 25, 2015 Thank you.I will try it...oOoOoOPS Elsino Mucka · March 25, 2015 Hey Arjun,I saw my code it was fine,it had both brackets..i dont why it doesnt show up here. Elsino Mucka · March 25, 2015 ``#include #include #include using namespace std;int main() {    char pinakas[10][10],direction;    int k,count,random,l,dolphins=0,move;    srand(time(NULL));    //O prwtos pinakas    k=(rand()%10);    l=(rand()%10);    random=(rand()%2);    for(int i=0;i`` Dol Lod · March 24, 2015 Honestly, how does even compile. Try compiling it on ideone.com. If you made something a two dimensional array you have to use both brackets to assign values.Ex. char a[5][6];You can't just say a[5]='H'. You have to say a[5][0]='H'.
• 1

C++

130,999 followers