All pastes #918916 Raw Edit

Someone

public cpp v1 · immutable
#918916 ·published 2008-02-26 13:32 UTC
rendered paste body
#include<iostream.h>#include<conio.h>#include<dos.h>#include<string.h>void Wyswietl(char *str, char *str2 = NULL, int cols = 1){   clrscr();   int len = 10;   if(cols > 1) gotoxy(35, len);   else gotoxy(40, len);   for(int i=0; i<strlen(str); i++)   {	cout << str[i];	len++;	if(cols > 1) gotoxy(35, len);	else gotoxy(40, len);   }   if(cols > 1)   {     int len = 10;     gotoxy(45, len);     for(int j=0; j<strlen(str2); j++)     {       cout << str2[j];       len++;       gotoxy(45, len);     }   }}void main (void){   char *imie = {"Filip"};   char *nazwisko = {"Kowalski"};	Wyswietl(imie);	sleep(2);	Wyswietl(nazwisko);	sleep(2);	Wyswietl(imie, nazwisko, 2);	sleep(2);   char * ze_spacja;   ze_spacja = new char[strlen(imie) + strlen(nazwisko) + 1];     strcpy(ze_spacja, imie);     strcat(ze_spacja, " ");     strcat(ze_spacja, nazwisko);   clrscr();   cout << ze_spacja << endl;   getch();   delete[] ze_spacja;}