921 Posted Topics
Re: Are you sure you want to do this? by making your program support CLR, you're sacrificing alot of portability and adding some chaos to your program. .NET is good for rapid development of larger programs, what you want to do may be better accomplished using the Win32 API. | |
Re: talhaz has the right idea, but that code may be confusing and it doesn't set the console cursor position. If you're using windows, you can write yourself a couple of helper functions, here's one to set the cursor position. [CODE=CPLUSPLUS]void SetPos(int x, int y) { static HANDLE hOut = GetStdHandle( … | |
Re: I think it's a good idea, in the past i've just given links to images, but it would be much better to be able to attach them. In this one for example [URL="http://www.daniweb.com/code/snippet958.html"][link][/URL] | |
Re: [QUOTE]Totally agree. All those pixels make it obvious. [/QUOTE]I can't tell by looking at the pixels, just looks like the typical jpeg-compressed image to me, and the shadows may make it look odd when zoomed. Edit: 1000th post, yay :) | |
Re: [QUOTE=Hiroshe;903588]Wow, really?[/QUOTE] Yeh, I found that video sort of annoying, not sure if there's still a link to it somewhere or not. | |
Re: [QUOTE]Can someone comment at least if this happens to them also even if they don't know the solution? [/QUOTE]It happens to me, sometimes it goes months without sending me notifications too, and suddenly starts again. | |
Re: [B]char*[/B] is a pointer to a certain amount of memory containing characters (assuming space was allocated there), and can be used to store a string. To play a file, you use the following arguments.[CODE=CPLUSPLUS]PlaySound("sound.wav", NULL, SND_FILENAME); [/CODE] And to make it loop, just put it in a simple [B]for[/B] loop. … | |
Re: Consider using the Dark GDK forum for actually having a decent chance of getting a reply from people who know something about it. [URL="http://forum.thegamecreators.com/"][link][/URL] | |
Re: He didn't do anything "wrong" as such, but there isn't any need to cast it. | |
Re: Perhaps a name not referring to food or drink. :P I've got an terrible imagination when it comes to thinking up names, though once (during my work experience) I had to drink up several names for a game brief, and resorted to making a random name generator which places vowels … | |
Re: [QUOTE]Nobody hates peanut butter and gets away with it. [/QUOTE]I get away with it, so stfu :D | |
Re: I don't believe in Ghosts. Every ghost video i've ever seen just looks so tacky, probably because the idea of "ghosts" just seems tacky to me. [QUOTE=The Dude]anyone who denies them is a fool[/QUOTE]Eh? what makes you SO sure that they are real? Get some proof before calling a high … | |
Re: I don't feel exhausted by learning new stuff, but for me it's not really such an obligation. I'm still in school and do have some free time on my hands which I try to never waste. Admittedly I haven't really learnt anything "new" on the computer recently, especially now that … | |
Re: W.I.L.L.I.A.M.: Wireless Intelligent Lifeform Limited to Immediate Assassination and Mathematics :P | |
Re: In a game of Pong? Making the bot really isn't difficult in a game such as this, the main functionality would be something like this:[code=cplusplus]if (ball.y < bot.y) { bot.y -= 5; } if (ball.y > bot.y) { bot.y += 5; }[/code]As for making it an even game, just do … | |
Re: I don't get it, what's your problem? Also, don't use [B]void main[/B], replace it with [B]int main[/B]. | |
Re: If you're using VS, try changing the runtime library to what is shown in my screenshot, while making sure the mode is set to release. Hope this helps. | |
Re: There's plenty of big-number libraries on the net, or if you have the programming ability, you can write your own big-number class.[code=c]struct BigInt { // ... }; int main( void ) { }[/code] | |
Re: Not entirely sure, but you're trying to communicate with a program that you don't fully understand, or know how it was made. For all you know, mspaint.exe may use a mouse hook to retreive clicks and movement, in which case this may not work. So if possible, try using an … | |
Re: >What were you trying to accomplish? The need for case-sensitive variables :P | |
Re: Cheesey, how about this. I know the exact problem you're facing, but I don't think I want to help you anymore. Seems your attitude here isn't getting you anywhere. | |
Re: It's not an official rule that you're not allowed to give away free solutions, so if he wants to give them away, he has that choice. He wont be given any warnings by a moderator. On the other hand, if he wants to help the OP, he shouldn't be giving … | |
Re: Try reading the documentation on how to install it perhaps? Check your linker settings, make sure you have entered everything correctly. | |
Re: Well, unless you're going to add some artificial intelligence to this, simply put a load of predetermined questions / answers in and apply them to an if / switch statement. | |
Re: [QUOTE]zomg lolwtfbbq u gt pwnd j00 n00b!!!!!!1 [/QUOTE]Your leet speak is actually kinda consistant, maybe I can make a [I]special [/I]program just to deleetify your stuff :D | |
Re: The language is optional, but the more popular ones are C/C++, or some .NET language such a C# or Visual Basic. Getting into programming isn't too difficult so long as you spend a good amount of time and put in some effort. [B]>It seems as though this is a free … | |
Re: [code]RECT r; GetWindowRect( hwnd, &r); ClipCursor( &r );[/code]Replace [B]hwnd[/B] with whatever the window is called, and you're done. | |
Re: Trying using the [B]long long[/B] or [B]__int64[/B] integer type. | |
Re: It's kinda hard to tell you how to fix the memory leak when we don't have the code, either post your code or keep searching yourself. | |
Re: Using the windows header, I managed it like this. [URL="http://www.daniweb.com/code/snippet1174.html"][link][/URL] | |
Re: >It can still be written more efficiently I'm curious, how could it get more efficient than that? | |
Re: Great, but probably not appropriate for the 'Posting Games' forum. | |
Re: If your IDE requires that the project is to be opened on your hard drive and not a cd, then the only way is to do what your friend did. Also, if it is a read-only cd, you wouldn't be able to make any changes to the project or even … | |
Re: Ever heard of [URL="http://www.answers.com/main/ntquery?s=punctuation&gwp=13"]punctuation[/URL]? Anyway, I have to admit, that confused me. This part:[ICODE]~(~0 << n)[/ICODE]will make a binary number containing however many 1's you tell it to, for example...[code]// ~(~0 << n); 0000001b == ~(~0 << 1) 0000011b == ~(~0 << 2) 0000111b == ~(~0 << 3) 0001111b == … | |
Re: I drew it out on mspaint first, and managed it. | |
![]() | Re: From msdn [URL="http://msdn.microsoft.com/en-us/library/ms633515(VS.85).aspx"][link][/URL] [QUOTE]The retrieved handle identifies the child window at the top of the Z order, if the specified window is a parent window; otherwise, the retrieved handle is NULL. The function examines only child windows of the specified window. It does not examine descendant windows.[/QUOTE] [QUOTE]If the function … ![]() |
Re: Why don't you start by giving us a less vague question. What is the program supposed to do? What output are you expecting? Without these details it's hard for us to help. | |
Re: [QUOTE]just because of Narue i am not going to make any good reputation in this website, who cares, i will always love her nomatter what. i was going to marry her if i could. [/QUOTE]In that case, stop complaining about your reputation and simply do as [B]sknake[/B] just said. Although … | |
Re: Use an API such as the Win32 API or any other graphics library out there. | |
Re: Off the top of my head... this should work.[code=cplusplus]HDC hdc = GetDC( NULL ); COLORREF rgb = GetPixel( hdc, 100, 50 );[/code] | |
Re: Would you mind posting the entire project zipped (with unneeded compiler generated files excluded) so I can run it and take a closer look. | |
Re: Creating a vector of [B]char*[/B] is a dangerous thing to do, as if a pointer to a string was added to the vector in a different scope, the data that the pointer is pointing to may not be valid anymore. For example, the following will work:[CODE=CPLUSPLUS]vector< char* > myVector; vector< … |
The End.