sajruz
public cpp v1 · immutable#include <iostream>using namespace std;int main(){ try { const int SIZE = 10; char *tmp[SIZE]; for (int i=0;i<SIZE;i++) { char add[]=""; cin.get(add,100); tmp[i] = new char[SIZE]; strcpy(tmp[i], add); printf("tmp[%i]: %s \n", i, tmp[i]); } for (int i=0;i<SIZE;i++) delete [] tmp[i]; return 0; } catch (bad_alloc) { cout << "something's wrong!"; }}