Thank you very much. I will look in to GetTickCount(), and other ways to sleep for 1ms at a time.
Type: Posts; User: scwizzo
Thank you very much. I will look in to GetTickCount(), and other ways to sleep for 1ms at a time.
I have a thread that I use to update information 50 times a second. To make sure it updates at that I measure how long it took to update the info, and then subtract that from 20 (1/50 = 20...
*Slams head on desk* When I went back to find the code for copy-pasting, I ended up noticing I was deleting the argument passed to the function (before it was used), instead of the class' member...
Did a search on this and didn't come up with anything, and it's starting to baffle me. I was working on some class functions that require a pointer to another class. I was originally implementing as...
I am having issues getting my text to appear on a print preview document. I have not tried printing yet, since I cannot get the print preview to work correctly. I have looked through the MSDN...
These are very dated OpenGL tutorials, but they will get your feet wet. Just a word with graphics/3D programming, it can be some of the most difficult programming with one of the steepest curves (not...
Who taught you about logic gates?
inline int OR(int x, int y)
{ if(x==0||y==0)
{
return (0);
}
else
return(1);
std::cin>> yoname will leave the return key in the input buffer, cin.ignore() will then discard this return key. cin.get() then waits until another return key is pressed.
The difference lies in how you are managing the memory. The way I showed copies a pointer, which means you are accessing the exact same elements as the other array. Edit something in one array, and...
What are you trying to find out about a file/folder? Here is the Win32 file structure API File Management Functions (Windows).
Look at the "Get" functions if you need information about the...
Can you post the code using the function? I'm curious as to if you are still calling strtok() for the first time on this line.
param=strtok(line,delims);
Also, atof() for me does not have any...
Does this help? Enumerated Types - Enums in C++ - Cprogramming.com
Depends on the definition of "copy". You can copy each element and make a second array with separate memory, or you can copy the pointer and have two arrays that point to the same spaces in memory.
...
You aren't casting a char pointer to an int. A pointer is a 32 bit (can be 64 on x64 systems??? donno for sure) integer to begin with. Just because it is a CHAR pointer, doesn't mean the...
ctime (time.h) - C++ Reference
Have a look at that reference (time.h). In this case, look at clock() time() and difftime().
Sleep() is not the same as sleep().
When you said it wouldn't close in debug mode, are you trying to close the window via the X in the top right corner, or the stop button on the VS GUI?
Visual Studios will hold a window open in...
Thanks guys. Using GetModuleFileName() worked out and now I can get the working directory of the .exe regardless of being a link, or even if it's launched through Visual Studios. Thanks again.
Here's something interesting.
When I use getcwd() I get the the correct path, but it still won't open my files. When I use GetCurrentDirectory() I get the C:\Windows\system\ path. So both return...
I am trying to deploy an application, and I ran in to this weird problem. When I install my program it works as it should, but only when I got to the Program File folder and click on the *.exe file...
Out of curiosity, what are you goals of this?
Reason I ask is that there are plenty of math libraries available so if you are making it for usage purposes then don't waste the time, just use a...
STYLE 0x10CE0804 | WS_MAXIMIZEBOX
That style will enable all the upper right boxes such as close, maximize, minimize. This is taken from one of my resource files, but you can set the style with...
Like MK27 said, you're on a C/C++ forum so most of us are going to say that's the way to go.
I learned C/C++ from reading internet tutorials when I was in high school. It definitely takes time to...
The output is right, but your input is flawed as you are pushing back a value on to an index that may or may not have been created yet. Like hawaiian robots said, in the second portion of your code...
Yes.
What don't you get? How would you do this problem if you had pen and paper, and a list of things to go through? (What if the list was 10000000000 numbers?)