Forum: C++ Dec 9th, 2008 |
| Replies: 1 Views: 301 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: 575 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++ Dec 8th, 2008 |
| Replies: 3 Views: 597 To help you out a bit more;
To use cout you need to have iostream included
#include <iostream>
Also, don't forget to use
system("pause");
because otherwise your console window will close... |
Forum: C++ Nov 22nd, 2008 |
| Replies: 12 Views: 1,344 Yeah, my bad;
i² = -1
you can't calculate i but you can use it |
Forum: C++ Nov 22nd, 2008 |
| Replies: 12 Views: 1,344 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,344 * -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,344 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,344 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,745 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: 10 Views: 770 Oh, now I get it,
maybe another way to do this is keeping an ID of every array row.
And while you order one array, locate the ID in the other and move that one too.
Or compare the IDs after the... |
Forum: C++ Nov 20th, 2008 |
| Replies: 10 Views: 770 I'm afraid I'm not getting what you're trying to say. Maybe it's too late for this... :-)
Are you trying to put the content of one array into the other or am I getting you wrong? Please elaborate |
Forum: C++ Nov 20th, 2008 |
| Replies: 10 Views: 812 You're declaring an ofstream with the append flag (ios::app) which appends to the file, opens it and adds text instead of overwriting the content. Try it out without that flag, see what happens.
... |
Forum: C++ Nov 20th, 2008 |
| Replies: 4 Views: 411 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; //... |
Forum: C++ Nov 20th, 2008 |
| Replies: 2 Views: 740 Most of the errors you get are typing errors I presume.
For instance, a lot of times you use max or min, where you're giving min or maxloc as argument to the function.
Also some variables are just... |
Forum: C++ Nov 20th, 2008 |
| Replies: 12 Views: 991 Oh right, thanks for clearing that up for me, I really appreciate it! |
Forum: C++ Nov 20th, 2008 |
| Replies: 12 Views: 991 I used your solution, thanks, I'm guessing this effectively rules out any other extended characters for example chinese ones... |
Forum: C++ Nov 20th, 2008 |
| Replies: 12 Views: 991 That doesn't seem right because when I try this:
char editControl_Content[2];
GetDlgItemText(hwnd, LOWORD(wParam), &editControl_Content[2], 2);
aString<< editControl_Content[2];... |
Forum: C++ Nov 19th, 2008 |
| Replies: 12 Views: 991 My bad, it's 0.20 here, typed it wrong...
EDIT: is this because è, ç, à are Extended ASCII? |
Forum: C++ Nov 19th, 2008 |
| Replies: 12 Views: 991 I have absolutely no clue why the following code works except for the following three characters: ç, à and è. It should rule out all non-digit characters from being written into an edit control.... |
Forum: C++ Nov 19th, 2008 |
| Replies: 13 Views: 1,546 I'll go for the stringstream. It seems easier. Thanks.
Every time I get a bit confused I'll start reading this thread before asking any questions ^^ |
Forum: C++ Nov 18th, 2008 |
| Replies: 13 Views: 1,546 I understand, yet it seems so silly why it would be like that, atleast in my point of view. I hope you're not tired of helping me because I have two more questions:
1. Is it necessary to convert the... |
Forum: C++ Nov 18th, 2008 |
| Replies: 5 Views: 670 Yeah, I thought about that already, but it seems so backdoorish (if that's a word ^^). I'll keep looking for a while first, maybe try the win32 group on Google and if all fails I guess I'll have to... |
Forum: C++ Nov 18th, 2008 |
| Replies: 13 Views: 1,546 Oh now I get it, so if you would for some reason want your 1 to be a then you would go like this:
char string[2];
string[0] = 1 + '@';
string[1] = '\0';
I'm still having trouble trying to... |
Forum: C++ Nov 18th, 2008 |
| Replies: 13 Views: 1,546 Yes but what about this 0 I have to add after each line, I thought it was only the null character at the end you had to add.
I don't understand that. If you have something that outputs 1 (integer)... |
Forum: C++ Nov 17th, 2008 |
| Replies: 13 Views: 1,546 char string[2];
string[0] = function() + '0';
string[1] = '\0';
This seems to work, why? I've googled up a bit but can't figure it out. |
Forum: C++ Nov 17th, 2008 |
| Replies: 13 Views: 1,546 I'm sorry but I still don't quite get how I can put integers as text into a char and then print those :( |
Forum: C++ Nov 17th, 2008 |
| Replies: 13 Views: 1,546 Hi,
I'm having some frustrating issues with char/strings.
I have a function which returns an unsigned short integer, the unsigned short integer is ALWAYS 1 char long. So if I try this code:
... |
Forum: C++ Nov 14th, 2008 |
| Replies: 5 Views: 670 I've added the entire project to this message. Thanks for taking a look into it. |
Forum: C++ Nov 12th, 2008 |
| Replies: 5 Views: 670 Hello,
I'm experiencing a little problem with what I'm trying to do:
I've created a large number of buttons with Photoshop, these however, already look like buttons, and are rounded. However, when... |
Forum: C++ Nov 10th, 2008 |
| Replies: 1 Views: 1,214 I want to simply put an image as background of my parent window. Is it possible to put this into the class?
wc.hbrBackground = image
I've been looking all over Google, maybe I'm using the wrong... |