All pastes #790189 Raw Edit

Dream within a Dream

public cpp v1 · immutable
·published 2007-11-20 04:11 UTC
rendered paste body
#include <iostream>#include <time.h>using namespace std;void sleep(unsigned int mseconds){     clock_t goal = mseconds + clock();     while (goal > clock());}int main(){    char poem[][32] = {         {""},         {"A Dream Within A Dream"},         {"by Edgar Allen Poe"},         {""},         {"Take this kiss upon the brow!"},         {"And, in parting from you now,"},         {"Thus much let me avow-"},         {"You are not wrong, who deem"},         {"Yet if hope has flown away"},         {"In a night or in a day,"},         {"In a vision or in none,"},         {"Is it therefore the less gone?"},         {"All the we see or seem"},         {"Is but a dream within a dream."},         {""},         {"I stand amid the roar"},         {"Of a surf-tormented shore"},         {"And I hold within my hand"},         {"Grains of the golden sand-"},         {"How few! yet how they creep"},         {"Through my fingers to the deep,"},         {"While I weep- while I weep!"},         {"O God! can I not grasp"},         {"Them together with a clasp?"},         {"O God! can I not save"},         {"One from the pitiless wave?"},         {"Is all the we see or seem"},         {"But a dream within a dream"},         {""},         {".:Ishkur:."}};for (int c=0;c<30;c++){    for (int i=0; i<strlen(poem[c]); i++)    {        cout << poem[c][i] << flush;        sleep(20);    }    cout << endl;}cin.get();return 0;}