Search Results

Showing results 1 to 13 of 13
Search took 0.01 seconds.
Search: Posts Made By: Chainsaw
Forum: C++ Feb 3rd, 2005
Replies: 3
Views: 25,543
Posted By Chainsaw
If it were me, I'd use sprintf() or one of its variants (_snprintf, say).

char display[30];
_snprintf( display, sizeof(display), "%.2f", empMoney );

And forget about scaleing it manually.
Forum: C Jan 24th, 2005
Replies: 6
Solved: binary search
Views: 32,431
Posted By Chainsaw
Here is your culpret:

beg=a[0];
end=a[9];

beg should be the bottom of the range to search, in this case 0.
end should be the top of the range to search, in this case n (not 9).

You are...
Forum: Python Jan 15th, 2005
Replies: 7
Views: 4,690
Posted By Chainsaw
Taking a clue from my managers at work, you should tell the compiler to work SMARTER, not HARDER. That will help.

Oh, gee, I guess it doesn't help employees either.
Forum: C++ Jan 4th, 2005
Replies: 19
Views: 6,497
Posted By Chainsaw
In C/C++, another valuable use of pointers is to point to an array of charactors. C doesn't have a string type, and instead you can use an array of char like this:

char name[20];

but to do any...
Forum: C++ Dec 18th, 2004
Replies: 3
Views: 3,036
Posted By Chainsaw
Ya, you need a

current_ptr = current_ptr->next;

in there...
Forum: C Dec 4th, 2004
Replies: 3
Views: 2,457
Posted By Chainsaw
you mean like:

1.2345
1.2344

is the same to 3 figures?

So, couldn't you say

int intX1 = (int)(x1 * figures);
Forum: Computer Science Nov 23rd, 2004
Replies: 10
Views: 9,520
Posted By Chainsaw
I'm sorry, but I can't resist:

"I like a woman who's into LaTeX"

:-)
Forum: C++ Nov 20th, 2004
Replies: 9
Solved: Tower Of Hanoi
Views: 11,887
Posted By Chainsaw
Hey! That's what I said! I wasn't trying to be rude, just helpful!

Google is a wonderful resource for algorithms.
Forum: C++ Nov 19th, 2004
Replies: 9
Solved: Tower Of Hanoi
Views: 11,887
Posted By Chainsaw
I went into Google and typed

algorithm analysis of Tower of Hanoi

and it came right up with a bunch of interesting sites.
Forum: C++ Nov 9th, 2004
Replies: 2
Views: 2,159
Posted By Chainsaw
GetWindowText, THEN do your calculation, THEN SetWindowText. Your calculation is not operating on anything.

GetWindowText(z); // get the result from the source box
<do math with z>...
Forum: DaniWeb Community Feedback Nov 6th, 2004
Replies: 38
Views: 9,698
Posted By Chainsaw
This discussion reminds me of Google Ads, which can sometimes be very inappropriate! I was reading my local newspaper online (which is where I found out about Danniweb, btw), and they had an article...
Forum: Computer Science Aug 13th, 2004
Replies: 24
Views: 17,299
Posted By Chainsaw
Best class I ever took in college was a class in formal logic.

Socrates is a man
A man is mortal
therefore, Socrates dresses as a woman to live forever.

Or, something like that. It's been a...
Forum: C Jul 15th, 2004
Replies: 2
Views: 6,628
Posted By Chainsaw
Something like this?


void main()
{
printf("leapyear");
}
Showing results 1 to 13 of 13

 


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

©2003 - 2009 DaniWeb® LLC