C++ style 'zelda' text

This is a discussion on C++ style 'zelda' text within the C++ Programming forums, part of the General Programming Boards category; I know how to make the text scroll from left to right in C, as I learnt most of C ...

C++ style 'zelda' text

I know how to make the text scroll from left to right in C, as I learnt most of C before learning C++. But I can't figure out how to make this work in C++. I do not want to mix C code with C++ code as that is bad practice. Does anyone know what changes I need to make to the following code sample from one of my C programs to make it into C++ code?

This is the code I need, but I wrote it in C ages ago:

Code:

int x, size;
char sentc[]="This will scroll from left to right using sleep as speed";
size=strlen(sentc);
for(x=0;x<size;x++)
{
sleep(40);
printf("%c",sentc[x]);
}

from what I can gather, I have to change sleep to Sleep and printf to cout. Am I on the right track? Thanks in advance!