All pastes #443190 Raw Edit

sajruz

public cpp v1 · immutable
·published 2007-04-16 17:43 UTC
rendered paste body
#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!";	}}