can sombody PLEASE help me!!!!

This is a discussion on can sombody PLEASE help me!!!! within the C++ Programming forums, part of the General Programming Boards category; Here is my plea: if i put this line of code in my program... printf("Hello my name is blogs"); how ...

  1. #1
    Its hard... But im here swgh's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,479

    can sombody PLEASE help me!!!!

    Here is my plea:

    if i put this line of code in my program...

    printf("Hello my name is blogs");

    how can i make the text scroll from left to right like in zelda???
    I have been through loads of google searches and had no luck.

    I think its somthing like:

    char senta[]=

    but i dont know.. Help me!!!

  2. #2
    Registered User mrafcho001's Avatar
    Join Date
    Jan 2005
    Posts
    483
    what do you mean like scroll?
    you can pring last letter clear screen print last 2 letters clear screen print last 3 letters and so on...
    not sure if its a good idea, but it will surely work

  3. #3
    Its hard... But im here swgh's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,479

    example

    what I want to do is to have each word appear individually, like on RPG games. I think it has somthiong to do with the string function. If you had a sentance to appear, I want it to sort of write it'self on the screen word by word rather than the whole thing appearing at once

  4. #4
    Registered User
    Join Date
    Jan 2005
    Posts
    7,340
    You would have to cause your program to sleep or delay in between printing each word you want to display. That sleep time might only be 200 milliseconds or something, but it would be enough to be noticable.

  5. #5
    Registered User
    Join Date
    Aug 2004
    Location
    San Diego, CA
    Posts
    313
    Code:
    void Talk(char* string, int time)
    {
    	int len = strlen(string);
    	
    	for (int x = 0; x < len; x++)
    	{
    		std::cout << string[x];
    		Sleep(50);
    	}
    	
    	Sleep(time);
    }
    This is probally close to what you want. This loop sleeps between each character, however, not each word. I'll leave that up to you to figure out.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Sombody PLEASE help!! Connect returning -1
    By ddoum9999 in forum C Programming
    Replies: 13
    Last Post: 01-03-2007, 02:27 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21