help me how to do a word scrolling like a snake game without hitting any keys.
alcay
0
Newbie Poster
Recommended Answers
Jump to PostIn a loop only display a certain section of the string at one time. Like this, where str is std::string with the contents you want to display
for(size_t i = 0; i < str.length()-9; i++) { cout << '\r' << setw(10) << str.substr(i, 9); Sleep(100); }
All 3 Replies
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
alcay
0
Newbie Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.