Search Results

Showing results 1 to 40 of 247
Search took 0.03 seconds.
Search: Posts Made By: ddanbe ; Forum: C++ and child forums
Forum: C++ 24 Days Ago
Replies: 3
Views: 259
Posted By ddanbe
That is a very good question Anettest. But, you get more chances in getting it solved if you pose it in the C++ forum, instead of the C# forum.
Also: put code between code tags.
Forum: C++ Aug 5th, 2009
Replies: 2
Views: 255
Posted By ddanbe
Why not search this site for answers?
Searched for "Pass items between forms"
I got http://www.daniweb.com/forums/thread12443.html
Forum: C++ Jun 6th, 2009
Replies: 9
Views: 496
Posted By ddanbe
I was going to say something here, but VernonDozier already said it very well.
Follow the wise advice of Salem : Compile as soon as you can!
Forum: C++ Jun 6th, 2009
Replies: 9
Views: 496
Posted By ddanbe
Lines 113 and 114 read:
cout << "You chose Hiroshima, is that correct? (Y/N)\a"<<endl;
cin >> pick_YN;

This is annoying the user. He just DID choose Hiroshima. Besides as far as I can figure...
Forum: C++ May 29th, 2009
Replies: 2
Views: 670
Posted By ddanbe
I think you have a menu option wich is called Help
Select it and choose Search
In the wondow that opens type DrawLine.
You will find what you are looking for. (he! U2 did not!)
Forum: C++ May 19th, 2009
Replies: 3
Views: 337
Posted By ddanbe
It's visual here but not visual C++ so post your question on the C++ forum.
Forum: C++ May 6th, 2009
Replies: 1
Views: 494
Posted By ddanbe
Very nice!
Forum: C++ May 6th, 2009
Replies: 7
Views: 292
Posted By ddanbe
He's counting his digits from right to left Walt.
So IMHO it has to be more something like this : (pseudocode)

number = 12345;
n = 4; //we seek the fourth digit from the right
num = number /...
Forum: C++ Apr 22nd, 2009
Replies: 5
Views: 437
Posted By ddanbe
I would reserve more bit space for the mantissa. Up to 64 or even more.
Forum: C++ Apr 20th, 2009
Replies: 9
Views: 1,064
Posted By ddanbe
Thanks siddhant3s for pointing that out! Because english is not my native language I sometimes get the two mixed up. It has to be square root of course!
Forum: C++ Apr 20th, 2009
Replies: 9
Views: 1,064
Posted By ddanbe
for(int i=2;i<x,i>x;i++) is wrong! Use for(int i=2;i<x;i++)

while (z)
return true;
is wrong! When you come to this point in your code you know you have a prime so why not just use return true;...
Forum: C++ Apr 9th, 2009
Replies: 7
Views: 641
Posted By ddanbe
22/7 is a poor approximation of pi.
You are essentially calculating the series x - (x^3)/3! + (x^5)/5! - (x^7)/7! + ... that is why n=2 at start and 2 is added every time 3+2=5 5+2=7 etc.
Don't...
Forum: C++ Mar 26th, 2009
Replies: 14
Views: 1,057
Posted By ddanbe
Looks OK. The switch in the else needs + 1 from case 3 to case 12 Every month from march on needs one day more because of leapyear. Alternatively you could also use one switch and let your...
Forum: C++ Mar 25th, 2009
Replies: 14
Views: 1,057
Posted By ddanbe
Well you have made a function how do you know it works. TEST it.
Make a small program.
Input : year.
Feed year to your leapyear function does it work as expected? Is 1800 a leap year is -200 a...
Forum: C++ Mar 25th, 2009
Replies: 14
Views: 1,057
Posted By ddanbe
What about testing that function in a smal program as pointed out earlier?
For the rest that's up to you, I should start thinking of making a list like so:
jan 0
feb 31
mar 59
apr 90
etc. ...
Forum: C++ Mar 25th, 2009
Replies: 14
Views: 1,057
Posted By ddanbe
Hey! I did not notice until now, look after the and operator : !== is not an operator, use !=
Forum: C++ Mar 25th, 2009
Replies: 14
Views: 1,057
Posted By ddanbe
First don't use an assignment operator in an if statement
year%4 = 0 better use == here.
Second you don't have to declare an extra variable isLeap. Just use return true or return false.
Perhaps...
Forum: C++ Mar 25th, 2009
Replies: 14
Views: 1,057
Posted By ddanbe
Start with the leap year function:
This function must return true or false, it's input is a year value.
Test if the year value is divisible by 100, if so then test if it's divisible by 400, if it...
Forum: C++ Mar 19th, 2009
Replies: 9
Views: 463
Posted By ddanbe
I believe it is 15 minutes.

btw:
>Spanki : line 25 or so of your code
while (!(sales<=0||sales>=0))------> very fancy way to say while false
Forum: C++ Feb 26th, 2009
Replies: 4
Views: 582
Posted By ddanbe
Look up some information about BigNums.
An integer or long integer can only hold a vast amount of bits.
Forum: C++ Feb 18th, 2009
Replies: 7
Views: 1,092
Posted By ddanbe
It's _fseeki64 I think and it's in <stdio.h>
Forum: C++ Feb 18th, 2009
Replies: 7
Views: 1,092
Posted By ddanbe
fseek32( filepointer , positie , SEEK_SET )
What is the value of positie or is it a typo?
Forum: C++ Feb 16th, 2009
Replies: 7
Views: 559
Posted By ddanbe
Forum: C++ Feb 12th, 2009
Replies: 1
Views: 324
Posted By ddanbe
Depends.
But this http://www.etro.vub.ac.be/Personal/bjansen/dlls/interfacing.html
may start helping you out.
Forum: C++ Feb 11th, 2009
Replies: 5
Views: 473
Posted By ddanbe
The code project has several matrix related articles like
http://www.codeproject.com/KB/recipes/matrixclass.aspx
hope this helps.
Forum: C++ Feb 2nd, 2009
Replies: 12
Views: 1,402
Posted By ddanbe
Show us what code you already have. It might enlighten us on the problem you are encountering.
Forum: C++ Feb 2nd, 2009
Replies: 2
Views: 371
Posted By ddanbe
The first term of your sum is always zero, so start with i=2.
Use an if-statement for the first factor of your product. If i is even then it is -1 else it is 1. For the second factor I should use...
Forum: C++ Feb 1st, 2009
Replies: 2
Code Snippet: Binary search
Views: 985
Posted By ddanbe
I WRITE this sentence now.
Yesterday, I WROTE a letter to my friend.
It WAS WRITTEN with a ballpen.
Forum: C++ Jan 31st, 2009
Replies: 5
Views: 435
Posted By ddanbe
meal = (t / (tar + 100)) * 100; ???
Why not use meal = t * (tar +100)/100; ?
Forum: C++ Jan 31st, 2009
Replies: 5
Views: 291
Posted By ddanbe
Why don't you leave out all the white space and convert it with the letters of the alphabet in reverse!
There is a preview, before you post, there are code tags, there is info enough here to read...
Forum: C++ Jan 30th, 2009
Replies: 5
Views: 700
Posted By ddanbe
You don't call a unit as you call it, you include it.
Then you are able to use all the functions etc. in the unit.
Forum: C++ Jan 30th, 2009
Replies: 5
Views: 700
Posted By ddanbe
Right MozaicFuneral. As far as I know the code will not even compile, but I just answered a question.
Forum: C++ Jan 30th, 2009
Replies: 5
Views: 700
Posted By ddanbe
Something like Output->Text = faren.ToString(); perhaps?
Forum: C++ Jan 25th, 2009
Replies: 3
Views: 324
Posted By ddanbe
str[i] * multiplier += total;

You are multiplying on the left side of the assignment operator +=.
Note that an assignment operator is not the same thing as an equal sign in math.
This is allowed...
Forum: C++ Jan 24th, 2009
Replies: 6
Views: 422
Posted By ddanbe
#2 will print out more than a million a+space i guess...
clutchkiller:
When you have a file with a million 'a' characters in it and you want to see it (most of the time on a screen) then there is a...
Forum: C++ Jan 24th, 2009
Replies: 7
Views: 408
Posted By ddanbe
I use Visual Studio. It has about the coolest debugger you can get.
Forum: C++ Jan 24th, 2009
Replies: 2
Views: 2,406
Posted By ddanbe
Very well done!
Forum: C++ Jan 24th, 2009
Replies: 2
Views: 289
Posted By ddanbe
Nice try manpreet!
Your first question implies you know the answer already.
Your second question imposes you don't have read http://www.daniweb.com/forums/announcement8-2.html
Do a search here on...
Forum: C++ Jan 24th, 2009
Replies: 3
Views: 466
Posted By ddanbe
Please read the following :
http://www.daniweb.com/forums/announcement8-3.html
Forum: C++ Jan 23rd, 2009
Replies: 11
Views: 844
Posted By ddanbe
First :
Make all your vars of type float.
The time I have to pay a meal that exceeds the range of a float I stop eating let alone that I have to pay in a range that would exceed a double type!...
Showing results 1 to 40 of 247

 


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

©2003 - 2009 DaniWeb® LLC