Is there any way to make this run faster and still do the same thing?
#include <iostream>
int box[80][20];
void drawbox()
{
for(int y = 0; y < 20; y++)
{
for(int x = 0; x < 80; x++)
{
std::cout << char(box[x][y]);
}
}
}
int main(int argc, char* argv[])
{
drawbox();
return(0);
}
IDE: DEV C++ || OS: Windows
printf
which has to parse format strings -- I don't think iostreams could beat the performance ofputc
andputs
although it should have been able to match them). – Endemic