Search Results

Showing results 1 to 40 of 101
Search took 0.02 seconds.
Search: Posts Made By: William Hemsworth ; Forum: C and child forums
Forum: C 6 Days Ago
Replies: 3
Views: 216
Posted By William Hemsworth
Animation can be done using the Windows API, but you have to really know what you're doing. Unfortunately there isn't many very simple graphic libraries out there, but you'd probably have most luck...
Forum: C 6 Days Ago
Replies: 3
Views: 216
Posted By William Hemsworth
What sort of things do you plan on doing? Are you looking to be able to manage an animation? or just draw shapes/text on a window.
Forum: C 20 Days Ago
Replies: 8
Views: 1,749
Posted By William Hemsworth
This is the implementation, firstly you can't do this in one line, and even if you could nobody would care.
Forum: C 21 Days Ago
Replies: 3
Views: 390
Posted By William Hemsworth
really nice snippet (: I'm sure this will come in handy for me sometime.
Forum: C 23 Days Ago
Replies: 1
Code Snippet: Prime Factorization
Views: 570
Posted By William Hemsworth
Nice, neat, consistent format, and well commented code :]
Forum: C 27 Days Ago
Replies: 1
Views: 228
Posted By William Hemsworth
We wont give you a free solution to what's probably homework, have you even tried it yet?
Forum: C 27 Days Ago
Replies: 2
Views: 259
Posted By William Hemsworth
Nope, not as far as I know, you will just have to create a function to return the right values, this could be a start:string getValueName(char vk) {
string name;

if ( vk >= '0' && vk <= '9' )...
Forum: C 32 Days Ago
Replies: 8
Views: 231
Posted By William Hemsworth
Don't beg, you are supposed to ask specific questions here, otherwise use google.
Forum: C 32 Days Ago
Replies: 3
Views: 274
Posted By William Hemsworth
The only way I can think of, is to use some inline assembly and get the value of the PC register, look up the use of asm with C.
Forum: C Oct 18th, 2009
Replies: 12
Views: 471
Posted By William Hemsworth
That's not correct, that just turns into:#include <stdio.h>

int main() {
printf("%s","string");
return (0);
}Once the preprocessor's done.
Forum: C Oct 18th, 2009
Replies: 12
Views: 471
Posted By William Hemsworth
Ahh, that's C+ code, didn't realize which forum this was. Try this:#include <stdio.h>

int main() {
printf("Hello"),
getchar();
return 0;
}
Forum: C Oct 18th, 2009
Replies: 12
Views: 471
Posted By William Hemsworth
Here the statement finishes with a comma, not a semicolon:#include <iostream>

int main() {
printf("Hello"),
getchar();
return 0;
}
Forum: C Oct 18th, 2009
Replies: 1
Views: 277
Posted By William Hemsworth
Couldn't be much more vague. If you want to find out whether or not a key is down, read about GetAsyncKeyState.
Forum: C Oct 17th, 2009
Replies: 11
Views: 1,290
Posted By William Hemsworth
I've come to the conclusion that both you and mika_ are the same person.

You know nothing, all you know how to do is link to crappy newsgroups, and every last one of us looks forward to the day...
Forum: C Oct 6th, 2009
Replies: 4
Views: 215
Posted By William Hemsworth
Search the web, we're not here for these sort of one-answered homework questions.
Forum: C Oct 6th, 2009
Replies: 3
Views: 225
Posted By William Hemsworth
They can also be very helpful outside structures, for example in this snippet I made some time ago. [link] (http://www.daniweb.com/code/snippet217147.html)
I used it in the main scope as a structure...
Forum: C Oct 6th, 2009
Replies: 3
Views: 272
Posted By William Hemsworth
Check the code snippets here, there's loads on this topic.
Forum: C Oct 6th, 2009
Replies: 7
Views: 270
Posted By William Hemsworth
Glad to have you too :P but code tags here is a must. All you have to do when writing your post is:

blah blah blah, and the code i'm currently struggling with is:
CODE HERE

I'm sure you can...
Forum: C Oct 6th, 2009
Replies: 4
Views: 198
Posted By William Hemsworth
Capital letters go at the start of a sentence, not the end. :icon_lol:
Forum: C Oct 6th, 2009
Replies: 7
Views: 270
Posted By William Hemsworth
Great, after three threads of being told to post the code, you don't use code-tags :icon_confused:
Please, read the rules too.
Forum: C Oct 5th, 2009
Replies: 3
Views: 232
Posted By William Hemsworth
AD even wrote a snippet to do something similar. [link] (http://www.daniweb.com/code/snippet216996.html)
Forum: C Oct 5th, 2009
Replies: 9
Views: 789
Posted By William Hemsworth
Because, I like it, it's a simple function which has one purpose, to convert an integer to string (with a radix). If anybody complained that they couldn't compile my code on a crap compiler, I...
Forum: C Oct 5th, 2009
Replies: 1
Views: 340
Posted By William Hemsworth
Do your own homework.
Forum: C Oct 4th, 2009
Replies: 4
Views: 196
Posted By William Hemsworth
You can't do that, you would have to do:else if ( keyStroke == 65 || keyStroke == 97 /* ect */ ) {
<code>
}In fact, just start over and read this. [link]...
Forum: C Oct 4th, 2009
Replies: 4
Views: 196
Posted By William Hemsworth
Every one of your if-statements is wrong. The syntax is supposed to be:
if ( <condition> ) {
<code>
}Yours is:if ( <condition> ); { // Get rid of that semi-colon
<code>
}Also, lines 39,...
Forum: C Oct 4th, 2009
Replies: 9
Views: 789
Posted By William Hemsworth
Using a union like that wouldn't technically be making it an ASCII string, ASCII represents text, and there asc is just pointing to some bytes of another data type.

It's doubtful that any decent...
Forum: C Sep 25th, 2009
Replies: 6
Views: 6,653
Posted By William Hemsworth
Don't reply to a 5 year old thread, start your own.
Forum: C Sep 7th, 2009
Replies: 5
Views: 743
Posted By William Hemsworth
Show us your code so far, so we can help then.
Forum: C Sep 3rd, 2009
Replies: 7
Views: 454
Posted By William Hemsworth
I'm surprised you figured out how to attach images. You've been here long enough to know how code-tags work, so please use them.
Forum: C Sep 3rd, 2009
Replies: 4
Views: 273
Posted By William Hemsworth
You posted two threads without showing any effort. Ask us specific questions on HOW to solve a problem. Posting some code would help a lot.
Forum: C Aug 28th, 2009
Replies: 4
Views: 229
Posted By William Hemsworth
You're not going to get much help with the amount of effort put in to presenting your question. Learn to type properly and use code-tags.
Forum: C Jul 9th, 2009
Replies: 4
Solved: strdup-casting
Views: 288
Posted By William Hemsworth
He didn't do anything "wrong" as such, but there isn't any need to cast it.
Forum: C Jun 25th, 2009
Replies: 10
Solved: Data Type
Views: 615
Posted By William Hemsworth
It's practically the same thing, in my example I used a struct anyway.
Forum: C Jun 24th, 2009
Replies: 16
Views: 685
Posted By William Hemsworth
I don't get it, what's your problem?

Also, don't use void main, replace it with int main.
Forum: C Jun 24th, 2009
Replies: 10
Solved: Data Type
Views: 615
Posted By William Hemsworth
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.struct BigInt {
// ...
};

int main( void ) {
}
Forum: C Jun 24th, 2009
Replies: 9
Views: 647
Posted By William Hemsworth
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.
Forum: C Jun 23rd, 2009
Replies: 11
Views: 555
Posted By William Hemsworth
Of course, IMO it should be an official rule, but if he wants to go ahead and screw up his rep, he can feel free to do so :D I wouldn't worry about it, I think he will get bored of posting full...
Forum: C Jun 23rd, 2009
Replies: 11
Views: 555
Posted By William Hemsworth
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...
Forum: C Jun 23rd, 2009
Replies: 7
Views: 802
Posted By William Hemsworth
Seems you are right, I had never heard of it in that way. [link] (http://en.wikipedia.org/wiki/Binary_image)

Well, the first thing you have to do is read and uncompress the GIF image before you...
Forum: C Jun 23rd, 2009
Replies: 7
Views: 802
Posted By William Hemsworth
Explain what you mean by "GIF image into binary". I'm assuming you mean to get an actual array of pixels instead of having them in a compressed format, but the question seems vague.

Marco93, if...
Showing results 1 to 40 of 101

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC