need help on writting a general outline
ok all i need is the general outline of the way which you think would be beast to get text to scroll...
eg: "C++ is cool "
"++ is cool C"
"+ is cool C+"
this is what i ahve up to date... i really need someone to help me work out the way to do it on paper :| also i cant use gotoxy() since it isnt standrard anymore :|
Code:
#include <iostream.h>
#include <string.h>
//------------------------------------------------------------------------------------------------
void ScrollText(char text[])
{
int stringlength=0;
int count=0;
stringlength=strlen(text);
while(count!=stringlength) //display inital sentence no scroll yet!
{
cout<<text[count];
count++;
}
while(secondcount!=stringlength)
{
cout<<text[count]
}
//------------------------------------------------------------------------------------------------
void GetArray()
/* get a charecter array
Pre: none
Post: return a charecter array to main for use by scrolltext() */
{
char text[10000];
cout<<"Enter the string to scroll now:";
cin.getline (text, 10000);
ScrollText(text);
}
//------------------------------------------------------------------------------------------------
int main()
{
GetArray();
return (0);
}
Re: need help on writting a general outline
[ Code:
#include <iostream.h>
#include <string.h>
//------------------------------------------------------------------------------------------------
void ScrollText(char text[])
{
while(secondcount!=stringlength)
Here's a problem. You never declare secondcount. Haven't checked the logic in the program, but this'll stop you first.