Thread: Help!!!!

  1. #1
    Unregistered
    Guest

    Help!!!!

    ok I'm foolin' with sleep. I got it to 1 error it is: Sleep function does not take 1 parameters... whats that mean and how i fix it?

  2. #2
    Registered User C_Coder's Avatar
    Join Date
    Oct 2001
    Posts
    522
    Errr do you think you could show us your code, might help
    All spelling mistakes, syntatical errors and stupid comments are intentional.

  3. #3
    Unregistered
    Guest

    it says same for introtxt

    #include <iostream.h>
    #include <conio.h>

    void main() {
    int number = 1;
    void Sleep();
    void introtxt();

    cout << "-Nogork-\nThe Game of Skill\n\nMade by: James A. Reiter.\n";
    introtxt("HI");
    Sleep();
    cout << "Hello, Folks.\n";
    }

  4. #4
    Registered User C_Coder's Avatar
    Join Date
    Oct 2001
    Posts
    522
    number 1
    void main()
    Should be int main(), main returns an int

    void Sleep();
    Is this a function you are writing yourself?? There is a standard sleep function you can use.
    Code:
    #include <iostream>
    
    using namespace std;
    
    int main( void )
    {
    	
    	
       _sleep( 1000 );
    
       cout << endl << "hello";
    
       return 0;
    }
    sleep() takes as an argument the number of milliseconds you wish to delay, so 1000 is 1 second.
    All spelling mistakes, syntatical errors and stupid comments are intentional.

  5. #5
    Unregistered
    Guest

    hmm

    so what u just put was the sleep thing or??? and end1 is just like \n right?

  6. #6
    Unregistered
    Guest

    im slow

    Will you plz rewrite what i did but correctly?

  7. #7
    Registered User C_Coder's Avatar
    Join Date
    Oct 2001
    Posts
    522
    end1 is just like \n right?
    Yes endl is a newline, but its end 'small' L not the 'number' 1
    Code:
    #include <iostream.h> 
    #include <conio.h> 
    
    void introtxt( what parameters? );
    
    int main( void ) 
    { 
         int number = 1; 
    
         cout << "-Nogork-\nThe Game of Skill\n\nMade by: James A. Reiter.\n    
         introtxt("HI"); 
         _Sleep( 1000 ); 
         cout << "Hello, Folks.\n"; 
    
         return 0;
    }
    Last edited by C_Coder; 03-29-2002 at 05:50 PM.
    All spelling mistakes, syntatical errors and stupid comments are intentional.

  8. #8
    Registered User
    Join Date
    Mar 2002
    Posts
    30

    hmmm

    this is the dude that started this......


    ok thx...
    HOw are ya?

  9. #9
    Registered User
    Join Date
    Mar 2002
    Posts
    30

    hmm

    Ok I tried that but.... it says _Sleep is an unidentified variable so....... how woudl i identify that? hmm
    HOw are ya?

  10. #10
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,138
    try including windows.h and using

    Sleep(num_of_miliseconds);//note S is capital in Sleep

  11. #11
    Registered User
    Join Date
    Mar 2002
    Posts
    30

    umm

    num of seconds is unidentified variable......

    Im new...
    HOw are ya?

  12. #12
    Registered User
    Join Date
    Mar 2002
    Posts
    30

    ok

    I got it to work. but it all goes at the begining i cant do it once then later again it just sorta adds on
    HOw are ya?

Popular pages Recent additions subscribe to a feed