Forum: C++ 9 Hours Ago |
| Replies: 4 Views: 63 Well you're very nearly there!
You said you wanted to find out how many items in the array were greater than 100, that would imply that you need some kind of counter, which is the missing ingredient... |
Forum: C++ 1 Day Ago |
| Replies: 4 Views: 88 You can't pass the filename like that, that's just passing "args[1]" as a string literal you need to do something like this:
// build the string..
std::string command = "fc " +... |
Forum: C++ 2 Days Ago |
| Replies: 6 Views: 107 Have you tried running your code through a debugger?
If you take the call to fabs out of your return statement in your operator== overload and store the result in a variable and then step through... |
Forum: C++ 6 Days Ago |
| Replies: 7 Views: 222 Despite working as a programmer for several years, I wouldn't consider myself an expert per se. I'm still learning new things every day. But I'd have to echo what niek_e said and say that the main... |
Forum: C++ 7 Days Ago |
| Replies: 3 Views: 144 Your GetData and GetSize functions need to be declared const
e.g.
unsigned GetSize() const // This
{
return n;
} |
Forum: Graphics and Multimedia 7 Days Ago |
| Replies: 3 Views: 230 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: Graphics and Multimedia 20 Days Ago |
| Replies: 6 Views: 732 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++ 29 Days Ago |
| Replies: 7 Views: 271 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++ 31 Days Ago |
| Replies: 5 Views: 390 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++ 31 Days Ago |
| Replies: 5 Views: 390 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++ Nov 5th, 2009 |
| Replies: 11 Views: 367 Hey Tom.
Looking at the error messages and the fact that some of them are referring to a vector and then looking at line 3 of your final block of code:
std::vector<BaseEnt> entities(;
Note:... |
Forum: C++ Nov 3rd, 2009 |
| Replies: 4 Views: 319 OK well, to clear things up we'll take a quick look at how different parameter passing methods affect the way that parameters to functions are handled inside functions.
There are three main ways... |
Forum: C++ Nov 3rd, 2009 |
| Replies: 4 Views: 319 OK, I'm not sure exactly what you're after here but this snippet might help you a little:
#include<iostream>
#include<fstream>
#include<string>
#include<vector>
using namespace std;
... |
Forum: C++ Oct 29th, 2009 |
| Replies: 7 Views: 264 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 16th, 2009 |
| Replies: 7 Views: 409 Another thing that was pointed out by one of my math-geek colleagues was that my algorithm would also incorrectly flag 1 as prime.
Now I always thought that 1 was prime (it only divides evenly by... |
Forum: C++ Oct 9th, 2009 |
| Replies: 18 Views: 1,003 OK, push_back definitely is the safest way of populating a vector. However, the method I'm about to show is not particularly good practice, but it can be done and it does have it's uses:
... |
Forum: C++ Oct 9th, 2009 |
| Replies: 4 Views: 353 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 7th, 2009 |
| Replies: 20 Views: 453 To put dkalitas point a little more succinctly:
If you want to execute several statements under an if() statement, then you should enclose them with curly braces '{}'.
e.g.
if(condition)
{
... |
Forum: Graphics and Multimedia Oct 7th, 2009 |
| Replies: 14 Views: 2,116 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: Python Sep 29th, 2009 |
| Replies: 22 Views: 969 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 28th, 2009 |
| Replies: 1 Views: 348 OK, I know it's been a while since I originally posted this and I've marked the thread as solved, but this is a valid bug in wxPython....So here's a quick update!
I finally managed to get onto the... |
Forum: Python Sep 25th, 2009 |
| Replies: 4 Views: 273 OK, here's a very simple class and some code to test it, based on what you posted previously!
# here's a simple class
class MyClass:
# class constructor/initialisation
# if no string is... |
Forum: Python Sep 21st, 2009 |
| Replies: 9 Views: 404 I can't see a problem with the code you've posted!
However if you were using this before:
if x==1 or 2:
Then as gerard has said, the if statement would always evaluate to True...
for... |
Forum: Geeks' Lounge Sep 18th, 2009 |
| Replies: 42 Views: 2,051 Hey, we've almost got enough people in this thread to start up an internet based all-geek band here on Daniweb!
Me 'n Crazzy Cat can share drum / percussion duties,
Serkan Sendur and Mosaic... |
Forum: C++ Sep 16th, 2009 |
| Replies: 5 Views: 391 Considering the problem you have set, your algorithm is completely wrong. And as already mentioned by niek_e, you're using the for loop incorrectly too!
Follow niek_e's advice and take a good look... |
Forum: C++ Sep 14th, 2009 |
| Replies: 4 Views: 202 In main() you aren't instantiating your matrix class correctly.
Also your add and multiply functions are currently member functions so you'd have to access them via an instance of your Matrix... |
Forum: Graphics and Multimedia Sep 10th, 2009 |
| Replies: 7 Views: 680 Hey there,
Attached is a quick example to show you what I mean.
I've attached example.zip which contains a simple 200x50 .swf with an example of that text effect from the tutorial you posted.... |
Forum: Geeks' Lounge Aug 21st, 2009 |
| Replies: 169 Views: 10,804 Here are a few of my favourites:
Life, loathe it or ignore it, you can't like it. - Marvin the paranoid android (Hitch Hikers Guide To the Galaxy).
I'm not afraid to die, I just don't want to... |
Forum: C++ Aug 19th, 2009 |
| Replies: 10 Views: 444 What about if you change px from int to long? Does that give you any differemt results?
The thing to take note of here is that px is currently declared as an int. Whereas rect.right and rect.left... |
Forum: C++ Aug 7th, 2009 |
| Replies: 4 Views: 305 One other thing has sprung to mind....
If your program is actually running for a while before it bombs out, it's almost certainly a bug in your code.
If it works on your machine and not any... |
Forum: Python Aug 6th, 2009 |
| Replies: 5 Views: 326 OK,
After this line:
label = Tkinter.Label(pg4_group.interior(), image=photo)
try adding the following:
label.photo = photo
This will create an instance of your image in the label,... |
Forum: Windows NT / 2000 / XP Aug 3rd, 2009 |
| Replies: 6 Views: 446 Piriform do a great free file recovery tool called recuva, which I highly recommend. Take a look at www.recuva.com.
I've used it several times to recover files when friends or relatives have... |
Forum: Graphics and Multimedia Jul 29th, 2009 |
| Replies: 8 Views: 533 No probs vishal.
One small point, just in case there's any confusion... I was talking about the Flex 3 SDK, not Flex builder!
But now that you mention it, I completely forgot about Flex Builder.... |
Forum: Graphics and Multimedia Jul 25th, 2009 |
| Replies: 6 Views: 382 I agree, Gimp and Inkscape are probably the best options.
Also Xara Extreme is another powerful (and free) vector GFX editor for Linux which might be worth trying.
Another supposedly good Linux... |
Forum: Graphics and Multimedia Jul 24th, 2009 |
| Replies: 4 Views: 788 The developer wasn't doing anything incorrectly in frame 1, he just needed to do things differently at frame 1 because the manner in which the data is being displayed is different.
Consider this: ... |
Forum: Graphics and Multimedia Jul 22nd, 2009 |
| Replies: 4 Views: 788 From what I can see it looks as if the original developer used two different methods to load the XML data.
In frame 9 (frame label "txt_b"), there is an example of the familiar scrollbar in layer... |
Forum: Graphics and Multimedia Jul 22nd, 2009 |
| Replies: 2 Views: 448 This one was pretty straightforward...
Take a look at divisions.xml
If you look at the entry for "Eyesite" you can see that the "[CDATA[" tag at the start of the line hasn't been closed... |
Forum: Graphics and Multimedia Jul 13th, 2009 |
| Replies: 5 Views: 805 Here's another version of your file...This time I've added an extra person..Take a look inside "sprite 145" and take a look inside the library and you'll see what I've done to add the extra person!
... |
Forum: Graphics and Multimedia Jul 13th, 2009 |
| Replies: 5 Views: 805 Hey I recognise this,
You posted this a while ago. So the .fla you were using was decompiled from a .swf! No wonder there were so many badly named layers and objects in the library!
From what I... |
Forum: Graphics and Multimedia Jun 23rd, 2009 |
| Replies: 4 Views: 666 You might want to check that your hosts allow .swf files to be uploaded to their servers. Most web hosts nowadays allow .swf files, but I suppose it wouldn't hurt to check!
Also if you want a... |