CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 1999
    Posts
    4

    sleep() URGENT!!!!!!!

    i need help!!! i wan the dots to appear one by one. but i got errors. 'sleep' is not a member of 'global namespace' and 'sleep' is undeclared identifier.
    #include <stdio.h>

    main()
    {
    int counter;

    for(counter=0;counter<10;counter++)
    {
    printf(".\n");
    sleep(?????);
    }

    return 0;
    }




  2. #2
    Join Date
    Apr 1999
    Posts
    5

    Re: sleep() URGENT!!!!!!!

    Try
    #include <winbase.h>
    ...
    Sleep(1000);


    HTH
    Markus


  3. #3
    Join Date
    Apr 1999
    Posts
    18

    Re: sleep() URGENT!!!!!!!

    Hi,
    you didn't mention which operating system and platform you tried this.
    In Turbo C++, I think you should use Delay(...); instead of sleep();
    In Windows,and VC++, you try with Sleep(..); // Capital 'S'
    Include the header file "Winbase.h" also.
    thanks


  4. #4
    Join Date
    Apr 1999
    Posts
    13

    Re: sleep() URGENT!!!!!!!

    Use delay(); instead of sleep....
    SleepEx or Sleep is for the Windows application






Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured