35 Topics

Member Avatar for William Hemsworth

Hi all, I'm a very early user of Daniweb, and after a long break, and I'm hoping to participate a bit more in this forum again. I'm here specifically for some advice before starting a new project of mine. I'm an experienced C++ / Win32 developer, but seem to be …

Member Avatar for rproffitt
0
437
Member Avatar for William Hemsworth
Member Avatar for Uchenna_1
0
9K
Member Avatar for William Hemsworth

I'm working on a program that requires some very low level optimization. My question is, when precision isn't an important factor, how can I automatically use the most efficient floating point type for whatever architecture the program is being run on? As far as I'm aware, floats are more efficient …

0
198
Member Avatar for William Hemsworth

Quite a while ago, I made [URL="http://www.daniweb.com/code/snippet217147.html"][B]this[/B][/URL] snippet. This code is basically the same, except that it adds animation. This method of blitting is very fast assuming you don't use a surface that's too large. On a 500 x 500 surface, I managed 350fps using only 0-1% of the cpu. …

Member Avatar for thetukiet
1
7K
Member Avatar for William Hemsworth

Hi, thanks for any help in advance. I was hoping to get some guidance for getting started with connecting to an SQL database online. I'm writing an application in Win32 which needs to be able to read/write to a database. I have plenty of experience with C++, but almost no …

Member Avatar for William Hemsworth
0
357
Member Avatar for William Hemsworth

Saw [this](http://www.daniweb.com/software-development/cpp/code/216430/add-a-little-graphics-to-your-console) and decided to make a little spinoff with some physics of mine. Enjoy!

Member Avatar for YassinTAH
1
448
Member Avatar for William Hemsworth
Member Avatar for William Hemsworth
Member Avatar for William Hemsworth
2
7K
Member Avatar for William Hemsworth
Member Avatar for William Hemsworth
1
3K
Member Avatar for William Hemsworth

[URL="http://www.cleverbot.com/"]http://www.cleverbot.com/[/URL] Here's a fun and interesting site I found, I'm curious to know how exactly it 'learns' from the user. This is how my chat went :D[QUOTE]User: How are you? Cleverbot: Quite good, thank you. How are you? User: I am terrible. Cleverbot: Why is that? User: Because you hate …

Member Avatar for vivosmith
2
426
Member Avatar for William Hemsworth

Hi, I've been working on a sudoku game, which seems to be working pretty well so far. I've managed to make a basic solver, and the interface is pretty nice :icon_cheesygrin: But i'm having problems trying generate a random unique sudoku. I need to be able to create 3 different …

Member Avatar for William Hemsworth
0
765
Member Avatar for William Hemsworth

On [URL="http://www.daniweb.com/forums/thread245377.html"]this[/URL] thread, everything appears to be okay until you click Toggle Plain Text, I found that on line 89, this appears:[CODE]switch(LOWORD(wParam)) { case IDD_ABOUT[COLOR="Red"][B]<b></b>[/B][/COLOR]: {[/CODE]Instead of:[CODE]switch(LOWORD(wParam)) { case IDD_ABOUT: {[/CODE]

Member Avatar for William Hemsworth
0
185
Member Avatar for William Hemsworth

Words aren't wrapping correctly, if one word exceeds the line length, you should wrap it anyway. Problem happens in my Control Panel under 'My Recently Viewed Threads' from [URL="http://www.daniweb.com/forums/thread240476.html"]this[/URL] link.

0
93
Member Avatar for William Hemsworth

Here's a function that manually converts an integer to any base between 2 and 36, the parameter list is: [CODE]void toBase( int value, // Integer value to convert char *target, // Pointer to a large enough buffer int base, // Base (from 2 to 36) int fixedDigitCount // The minimum …

Member Avatar for William Hemsworth
0
213
Member Avatar for William Hemsworth

Each page is taking me 20-30 seconds to load, it's pretty frustrating :icon_neutral: Is there a reason for this?

Member Avatar for happygeek
2
154
Member Avatar for William Hemsworth

Just watched this on TV under an hour ago. [url]http://www.youtube.com/watch?v=cHZ2mQczkcg[/url] It was amazing. We switched to the channel the lottery was on, and both were live. He managed to predict the results perfectly. I don't think he used any illusions, but I will be very interested to see how he …

Member Avatar for William Hemsworth
0
59
Member Avatar for William Hemsworth

This snippet basically shows you how to input a password from the user without actually displaying the characters, instead they are replaced with the ' * ' character as you type. The code is uncommented, so I will briefly explain it. This function: [ICODE]void PasswordInput(char *password, size_t maxLength)[/ICODE] has two …

0
525
Member Avatar for William Hemsworth
Member Avatar for William Hemsworth
0
744
Member Avatar for William Hemsworth

This snippet shows how you can manually split up a sentence using multiple delimiters. In this example, I split up this sentence: [ICODE]"Hello, my name is william!"[/ICODE] into the following: [ICODE]"Hello"[/ICODE] [ICODE]"my"[/ICODE] [ICODE]"name"[/ICODE] [ICODE]"is"[/ICODE] [ICODE]"william"[/ICODE] As you can see, the delimiters are not included ([ICODE]" ,!"[/ICODE])

Member Avatar for William Hemsworth
0
277
Member Avatar for William Hemsworth

Heres a snippet that allows you to make your own images by using a mathematical formula. It gives you fast access to each pixel in the bitmap, and then saves the image as a [B].bmp[/B] once its made. You can be creative like this and make images which would be …

Member Avatar for Prabakar
0
1K
Member Avatar for William Hemsworth

Heres a snippet that compares the speed of volatile (nonregister) variables, and register variables and display's the average cycle count for each. This shows you exactly how much using registers speeds up loops and calculations. I get the following output, but it may vary: [QUOTE]Cycle count for nonregister integer: 8 …

0
148
Member Avatar for William Hemsworth

This snippet shows how to use hooks to stop the cursor from entering a certain area of the screen. This example will stop the cursor from going over 300 pixels away from the centre of the screen by using a bit of maths.

0
744
Member Avatar for William Hemsworth

Hey, Here is a program I made which has interested quite a lot of people over the past few weeks, so I figured I would share it :) Using a small amount of trigonometry you can create some very fascinating shapes and effects. But in order to draw anything you …

0
170
Member Avatar for William Hemsworth

Hey, My problem is im not recieving instant email notifications anymore, it has just completely stopped for one moment to the next. All my settings seem to be ok and when a reply to a thread, under the [B]Thread Subscription[/B] it is set to [B]Instant email notification[/B]. Im not sure …

Member Avatar for William Hemsworth
0
158
Member Avatar for William Hemsworth

I came across a small bug recently when clicking on a link to a user profile. It seems that no matter what name you click on, it will only ever link you to the member who last posted in that thread. In my screenshots, I clicked on the link to …

Member Avatar for Comatose
0
378
Member Avatar for William Hemsworth

Click [URL="http://www.dyson.co.uk/about/games/telescope.asp"]HERE[/URL]. Im up to level 23, currently stuck ;) Have fun :)

Member Avatar for sittas87
0
97
Member Avatar for William Hemsworth

A friend of mine just sent me this, I found it very funny! :icon_lol: [URL="http://newmedia.funnyjunk.com/pictures/learnchinese.jpg"]http://newmedia.funnyjunk.com/pictures/learnchinese.jpg[/URL]

Member Avatar for ~s.o.s~
3
120
Member Avatar for William Hemsworth

Ahh, its soo confusing, I could only see her turning clockwise for about 10 minutes at first, then I could only see her going anti-clockwise.. which way do you see her turning :confused: ?? [URL="http://www.news.com.au/perthnow/story/0,21598,22492511-5005375,00.html"]http://www.news.com.au/perthnow/story/0,21598,22492511-5005375,00.html[/URL]

Member Avatar for GrimJack
0
183
Member Avatar for William Hemsworth

I have come across this problem a couple of times, if you reply to a thread, and then within a minute reply again, the order of the posts change like it has done for me in this thread. [URL="http://www.daniweb.com/forums/thread140791.html"]http://www.daniweb.com/forums/thread140791.html[/URL] I dont know if anyone else has ever experienced this problem.

Member Avatar for Ancient Dragon
0
98
Member Avatar for William Hemsworth

Whats the highest score you can get ?? [URL="http://www.ferryhalim.com/orisinal/g3/00bells.swf"]Link[/URL] My best sofar is 1,113,870 :) Have fun.

Member Avatar for maydhyam
0
94
Member Avatar for William Hemsworth

Hi everyone. Here is a program I made which will find patterns in a list of primes. It does this by finding the difference between each prime and adding them to a vector like this: [CODE] Primes: 2 3 5 7 11 13 ^ ^ ^ ^ ^ Difference: 1 …

Member Avatar for Prabakar
0
160
Member Avatar for William Hemsworth

Hi I have a small question, probably quite obvious but I cant seem to figure it out. When using the ifstream or any other stream you can tell if it was sucessfull in its last event. For example: [CODE=CPP] #include<fstream> int main() { ifstream in("test.txt", ios::in); if (in) { } …

Member Avatar for William Hemsworth
0
110
Member Avatar for William Hemsworth

Hi I am trying to make function which returns a substring as a [ICODE]char*[/ICODE], but [ICODE]string::substr[/ICODE] returns a [ICODE]const char*[/ICODE]. So I have managed to make a function that will return a substring as [ICODE]char*[/ICODE], except when I was comparing the speed of the two, I found that [ICODE]string::substr[/ICODE] was …

Member Avatar for William Hemsworth
0
277
Member Avatar for William Hemsworth

Hello I have a friend who has a problem with his PC, as soon as he turns his computer on it will get stuck at the loading screen. The last line is displays is: [B]Press F1 for setup...[/B] He has the same problem before but it would continue normally after …

0
62
Member Avatar for William Hemsworth

Hi I have a memory leak somewhere in this code but I have no idea where. Can anybody help me out ? [CODE] #include <windows.h> #include <mmsystem.h> #pragma comment(lib, "winmm.lib") #include <fstream> #include <time.h> #include <cstring> #include "resource.h" using namespace std; const char cn[] = "SameGame"; // ClassName HBITMAP BLUEBMP …

Member Avatar for William Hemsworth
0
200