Forum: C++ Dec 9th, 2008 |
| Replies: 1 Views: 298 What a coincidence, someone wrote a topic about that yesterday, you can find it here: http://www.daniweb.com/forums/thread161189.html
Oh and your link is wrong, it has a h too much in it. It should... |
Forum: C++ Dec 8th, 2008 |
| Replies: 8 Views: 574 You can't have a function that has the same name of your class, how can you tell what's what?
You have some code outside the main function or any other functions, that doesn't seem right.
Hope... |
Forum: C++ Nov 22nd, 2008 |
| Replies: 12 Views: 1,330 Yeah, my bad;
i² = -1
you can't calculate i but you can use it |
Forum: C++ Nov 22nd, 2008 |
| Replies: 12 Views: 1,330 If you don't mind add your code and I'll try and take a look at it :) |
Forum: C++ Nov 22nd, 2008 |
| Replies: 12 Views: 1,330 * -1
The square root of -1 is -1 we say. So it would just make your number negative.
Maybe this documentation is helpful for you too :)
http://en.wikipedia.org/wiki/Complex_number |
Forum: C++ Nov 22nd, 2008 |
| Replies: 12 Views: 1,330 Well,
the square root of 4 is 2 because 2*2 is 4. So the square root of x is a number which complies to this: y*y = x.
This works for every number that is positive, however, if you try to take the... |
Forum: C++ Nov 22nd, 2008 |
| Replies: 12 Views: 1,330 The square root of 1 is 1, this should lead to the square root of -1 being -1, however, this is imaginary. Taking the square root of a negative number doesn't work.
i = -1
Hope this helps |
Forum: C++ Nov 20th, 2008 |
| Replies: 5 Views: 2,706 1 = 1
10 = 2
100 = 4
1000 = 8
You can solve this in more than one way, well I can think of multiple ways atleast ^^
Hope this helps |
Forum: C++ Nov 20th, 2008 |
| Replies: 4 Views: 409 If you want to use cout and cin you'll have to include <iostream> and use namespace std.
A sample program is something like this:
#include <iostream>
int main() {
int x, y, z, min; //... |