I think I found out what's wrong. The program consists of one function, main(). Every Sleep() is called inside main... and it collects every value of Sleep() I've put inside main() and pauses for that amount of time before running the program. I used cout << debug tags to find this out...
Thanks, brotherC, but the function Sleep() is being called, and not only am I using milliseconds, but I started using extravagantly high numbers of milliseconds (i.e. 500000) to make sure it isn't pausing. Sure enough, it isn't working. Dang Microsoft products.... >_<
I don't understand the relevance to my topic.... I appreciate your effort but I guess the confusion is on my end. I don't use threads, it's just a simple c++ proggie.
I don't know what you mean by multithreaded... My program is simple. It creates a Winsock socket, connects to another computer, sends data, then exits. It's all in one source file; it's just a few hundred lines of code. Do you know why the function doesn't work?
How do you pause your program? I've used the functions Pause() and Delay() that I saw somewhere, and the Sleep() function, which is more widely known, but none of them pause my program. It just rips right through the function and ignores it. It compiles w/no errors but it doesn't work...
I've got a Winsock program that will run perfectly if I can get two little functions to work:
1. I need to make the program pause. I've used EVERYTHING----I've used delay(), pause(), etc. None of them work! I don't get any error messages when I debug/run it, but the program simply doesn't...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.