I tried if(j==0) instead of j==[0] but it is just printing wall, then I can't print object because of the for |\n wall I need x y coordinator.
#include<iostream>
using namespace std;
int main(){
int wallx, wally, obx, oby;
const int length=10;
const int width=10;
for(wallx=0; wallx<width;wallx++){
cout<<" _";
}
cout<<endl;
//building wally but I want wally to print | on width of 0
for (int i[]={0}; i{}<width; i{++}}{
if(j==[0]){
cout<<"|\n";
}
}
Aucun commentaire:
Enregistrer un commentaire