#include <iostream>
#include <cmath> // for future
#include <cstdio>
int main() {
int width = 96;
int height = 25;
char* screen = new char[width * height +1];
screen[width * height] = '\0';
for (int i = 0; i < width; i++)
{
for (int j = 0; j < height; i++)
{
screen[i + j * width] = '@';
}
}
printf("%s", screen);
getchar();
}
a.out
получаю [1] 53371 segmentation fault ./a.out