samedi 30 avril 2022

What is the problem with this code and what's the good solution?

This is a question I'll have in my programming exam in uni and I need help understanding it

#include <iostream>
#include <string>
using namespace std;
int main()
{
int *tmb;
tmb = new int[1000] = { 0 };
for (register int i = 0; i < 1000; i++)
    cout << tmb[i];
free[] tmb;
system("PAUSE");
return 0;
}

Aucun commentaire:

Enregistrer un commentaire