Jump to content

Self Writting Text

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
5 replies to this topic

#1
kresh7

kresh7

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 661 posts
Ok Heres a pretty Fast Tutorial of how to make Self Writting Text in C++ Console Application im one of those people who love effects

Ok

//Here we are Calling Libary Files
#include <cstdlib> 
#include <iostream>
#include <windows.h>

using namespace std;

int main()
{
    char TheText[50] = "Welcome to Kresha's Tutorial"; // Declaring the String
    int len = strlen(TheText); // Here we take the length of the string and put it into an integer called len
    int i; // Declaring integer i
    
    
    for (i = 0; i < len ; i++) // For i = 0 if i is smaller then len(length of the string) i = i + 1 
{
   cout << TheText[i]; // output String from 0 length + 1 
   Sleep(100); // Here i Call the Sleep API so u can see the text appear Slow
}
    
 //================================
   cout << "\n";
    system("Pause");
    return 0;
}

thats all sorry for my bad english :D
Posted Image

#2
Guest_Jordan_*

Guest_Jordan_*
  • Guests
I moved it to the code forum since you didn't really describe anything. Nice code though.

#3
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
Good code, although it would help if you added some information about what it actually does - you say "self writing text", but it would have been much clearer to actually describe what happens. For example:

"this code will slowly print a previously defined string, letter by letter, to the output window. It does this by printing a character, then pausing for a tenth of a second, then printing the next character etc."
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums

#4
Egz0N

Egz0N

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 4,034 posts
good tutorial kresh .. :D

#5
kresh7

kresh7

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 661 posts

Xav said:

Good code, although it would help if you added some information about what it actually does - you say "self writing text", but it would have been much clearer to actually describe what happens. For example:

"this code will slowly print a previously defined string, letter by letter, to the output window. It does this by printing a character, then pausing for a tenth of a second, then printing the next character etc."
My mistake :P but you just did it for me so thx :P

Egz0N said:

good tutorial kresh .. :D
nahhh still learning :D
Posted Image

#6
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
Welcome.
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums