Forum: C++ 14 Hours Ago |
| Replies: 3 Views: 77 Your GetData and GetSize functions need to be declared const
e.g.
unsigned GetSize() const // This
{
return n;
} |
Forum: Graphics and Multimedia 18 Hours Ago |
| Replies: 3 Views: 96 I think that learning about tweening is a great idea, you should do it! heh heh!
When used properly tweening can make your animations look a lot more natural, realistic and life-like.
There... |
Forum: C++ 3 Days Ago |
| Replies: 4 Views: 150 Take a look at this page:
http://msdn.microsoft.com/en-us/library/b9skfh7s.aspx
Assuming that the other processes you mentioned are programs that you've written and as long as I understood the... |
Forum: C++ 3 Days Ago |
| Replies: 9 Views: 244 Aha, thanks Narue, that was beginning to bug me!
I've not done anything much with unicode, so I've never come across that particular problem before. But I guess that would make sense!
I shall... |
Forum: C++ 3 Days Ago |
| Replies: 9 Views: 244 Hmm, That's very odd!
After looking into this, Niek e's example compiles ok for me and outputs the strings properly.
I'm not sure why you're seeing the addresses of the columns instead of the... |
Forum: C++ 3 Days Ago |
| Replies: 9 Views: 301 OK, if you need a fresh pair of eyeballs to go over the code, .zip up all of the source files for your project and post it here as an attachment, I'd be more than happy to take a look at it for you!... |
Forum: C++ 5 Days Ago |
| Replies: 9 Views: 301 Hmmm, that's odd. That looks like it should correctly update the objects balance. Have you tried using the this pointer to refer to the balance?
e.g.
this->balance -= amount;
That might just... |
Forum: C++ 6 Days Ago |
| Replies: 9 Views: 301 OK, well take another look at your code...
When the Bank::withdraw function is called, a pointer to the relevant account is obtained. If the account balance is >= the amount, then the withdraw... |
Forum: C++ 6 Days Ago |
| Replies: 4 Views: 234 Personally I'd copy the sentence into a stringstream object and then use the stringstream's >> operator to separate each word from the sentence and store each word in a vector of strings.
Like this:... |
Forum: Graphics and Multimedia 13 Days Ago |
| Replies: 6 Views: 555 heh heh, aside from that and actually staying on topic..heh heh!
I've never used after effects, so I couldn't comment on its functionality, but it's certainly possible to do an intro like that in... |
Forum: C++ 21 Days Ago |
| Replies: 2 Views: 270 From looking at the code, it seems to me that if you run your debugger and step through the program you'll find that line 34 will fail to read anything from the input file.
The reason for this is... |
Forum: C++ 22 Days Ago |
| Replies: 7 Views: 265 Oh I see you've HAD to implement your own queue class as a part of your assignment...sorry I thought you were just over complicating things for yourself.
In that case, to turn your class into a... |
Forum: C++ 22 Days Ago |
| Replies: 7 Views: 258 dkalita has already explained it to you...Try reading his post again!
The function 'fun' returns an int.
But it takes a pointer to a function as a parameter.
The function pointer must point to a... |
Forum: C++ 22 Days Ago |
| Replies: 7 Views: 265 It seems to me that you are over complicating things. Wouldn't it be a lot simpler to just use a double ended queue, otherwise known as a deque?
Modifying your code from one of your previous posts... |
Forum: C++ 24 Days Ago |
| Replies: 9 Views: 329 You might want to take a look at this thread:
http://www.daniweb.com/forums/thread230230.html
The first few posts are irrelevant, but the later posts are probably more or less exactly what you're... |
Forum: C++ 24 Days Ago |
| Replies: 1 Views: 226 It's because the literal value (25.95) that you are passing into your call to the function VAR1 is automatically treated as a double, but your function takes a float as a parameter. So you're getting... |
Forum: C++ 24 Days Ago |
| Replies: 5 Views: 355 Aha,
I've just fired up one of my linux boxes, I've created a project in codeblocks using your files. I've made my suggested changes and and tried compiling... And there are still compiler errors.... |
Forum: C++ 24 Days Ago |
| Replies: 5 Views: 355 One thing that immediately strikes me is that you are using #pragma once, which as far as I am aware is a preprocessor command that is used solely by Microsoft compilers. So perhaps using traditional... |
Forum: C++ 34 Days Ago |
| Replies: 5 Views: 218 Alternatively, if you only wanted the extra block to be shown if the value of the parameter was 3 then you could change this block from my previous listing:
if(i==myCondition)
{
cout << "i = "... |
Forum: C++ 34 Days Ago |
| Replies: 5 Views: 218 Then what you need to do is parse the command line and store the relevant arguments in variables and then use those variables to determine what happens in your code.
So perhaps something like... |
Forum: C++ Oct 29th, 2009 |
| Replies: 7 Views: 257 Aha, I've just quickly tested it and it seems to work!
Here's a little program I knocked up, loosely based around previously posted code in this thread:
#include <iostream>
#include <algorithm>... |
Forum: C++ Oct 29th, 2009 |
| Replies: 7 Views: 257 I've not actually tried this, but would something like this work for the deq_test function?
bool deq_test(Str& deq1, Str& deq2)
{
if(deq1.a==deq2.a)
{
return(deq1.b<deq2.b);
}
else |
Forum: Python Oct 15th, 2009 |
| Replies: 4 Views: 218 Do you mean something like this??
numarray = [1,2,-3,4,5,-25]
for n in numarray:
print "The inverse of", num, "is", num * -1
#print("The inverse of", num, "is", num*-1)
# use the... |
Forum: C++ Oct 9th, 2009 |
| Replies: 25 Views: 588 Ah hang on, I see the problem.....I should've spotted this off the bat! heh heh!
#include<iostream>
#include<string>
using namespace std;
class STD1{
int id;
string... |
Forum: C++ Oct 9th, 2009 |
| Replies: 4 Views: 348 Why don't you try using the shlobj.h function SHGetSpecialFolderPath to get the path to the users My Documents folder? It would save all of the messing about your doing there!
Try replacing the... |
Forum: C++ Oct 9th, 2009 |
| Replies: 25 Views: 588 What about this?......
string name = string("");
That should do the trick!
Cheers for now,
Jas. |
Forum: Graphics and Multimedia Oct 7th, 2009 |
| Replies: 14 Views: 1,992 OK, well the only thing I can think of is perhaps you aren't using one of the debug flash players...Only the content debugger versions of flashplayer will allow you to see trace actions.
The... |
Forum: Graphics and Multimedia Oct 7th, 2009 |
| Replies: 14 Views: 1,992 Yup you got it Raja, that's how you set up the path to the SDK and the path to the external flash player!
I've got my Flashdevelop set up to use the flashplayer10 debug executable!
Note: in the... |
Forum: Graphics and Multimedia Oct 6th, 2009 |
| Replies: 14 Views: 1,992 Sorry I'm late to the conversation...Not been about today!
I'm on my linux box again, so I haven't got a copy of Flashdevelop open in front of me...But if memory serves, there is trace... |
Forum: Graphics and Multimedia Oct 5th, 2009 |
| Replies: 14 Views: 1,992 OK.
At the moment, Flashdevelop is only available for windows. (I believe there are mac and *nix ports in the pipeline...Not sure how well it runs on wine.). So Windows XP or Vista is the main... |
Forum: Python Sep 29th, 2009 |
| Replies: 22 Views: 956 Not really, because in MS Windows the 'Program Files' folder is the system default folder for programs to be installed in (and there are usually a lot of programs installed there!).
Simply... |
Forum: Python Sep 29th, 2009 |
| Replies: 22 Views: 956 Dammit...I thought I'd tried that combination of string in string earlier..... Obviously that was one permutation I missed!
Hang on....Looking back at my failed scripts from when I was playing... |
Forum: Python Sep 29th, 2009 |
| Replies: 22 Views: 956 I've just done a bit of digging around on python.org and found this:
http://bugs.python.org/issue1524
Looks like I'm not the first person to come up with this workaround....See the post made by... |
Forum: Python Sep 29th, 2009 |
| Replies: 22 Views: 956 It took a bit of playing around, but think I've found a workaround for this....
I noticed in the docs for os.system() (Yes I RTFM!) it mentions that the subprocess.call() should be used instead.... |
Forum: Python Sep 26th, 2009 |
| Replies: 7 Views: 339 It's the only way I could access the strptime function.
The first datetime refers to the datetime package, the second refers to the datetime class.
In my import I could have used something like:... |
Forum: Python Sep 25th, 2009 |
| Replies: 7 Views: 339 Firstly 'input' is a reserved word in python, it's used to get input from the user, (rather like raw_input!). So that's why this line of code fails to do anything:
input = raw_input("Type Date... |
Forum: Python Sep 25th, 2009 |
| Replies: 4 Views: 256 OK, I started working on this when I saw your original post. But since I started, you made your second post. So I've modified it a little to give the line numbers; but I've not got it to output the... |
Forum: C++ Sep 25th, 2009 |
| Replies: 3 Views: 181 The description of your problem is at best vague and at worst confusing...Being able to see the code that's actually causing you the problem would help!
So if you could post some code it would help... |
Forum: C++ Sep 25th, 2009 |
| Replies: 5 Views: 450 What about replacing the backslashes with forward slashes?
So wherever there was a single backslash, replace it with a forward slash. That should also fix your problem!
I know typically in... |
Forum: Python Sep 24th, 2009 |
| Replies: 3 Views: 422 Here's something I just knocked up in a few minutes....This isn't exactly what you're doing, but it should give you a few ideas to use in your game.
My variant uses one tower. The player starts... |