#include <iostream>
void Puts(const char* k) {
std::cout << k << std::endl;
}
class cell {
private:
int X;
int Y;
int A[16][16] = {
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,},
};
public:
cell(){
X = 0;
Y = 0;
}
void Xup(){
X++;
X %= 16;
}
void Yup(){
Y++;
Y %= 16;
}
void Celin(int G){
A[X][Y] = G;
}
void Celinto(int x,int y,int G){
A[x][y] = G;
}
int get(){
return A[X][Y];
}
int getto(int x,int y){
return A[x][y];
}
};
int main() {
cell CLL;
while(CLL.getto(1,2) < 10){
Puts("Hello world!");
CLL.Celinto(1,2,CLL.getto(1,2)+1);
}
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: