Search:
Type: Posts; User: dan56965
Search :
Search took 0.01 seconds.
December 3rd, 2008 03:04 PM
Well if that's the case, then I guess it's ok.
I only ask as it's for a coursework that's assessed on the code being 'nice'...
thanks
December 3rd, 2008 02:57 PM
I'm kind of stumped as to how to write this in C++, seeing as I need some way of making the out of range array references = 0.
Source, filter and output arrays:
S [7] = { 1,2,3,4,5,6,7 };...
December 2nd, 2008 02:19 PM
Glad to hear it!
On the subject of formatting though, I suggest you clean up that block of declarations at the top - it took me a few mins just to find the start of the 'do while' loop. The idea...
December 2nd, 2008 01:58 PM
Ah.... Success!
Although, I'm surprised the compiler doesn't catch something like that out, but I guess there's a reason for that....
Anyway, thanks again for your time, it is greatly...
December 2nd, 2008 12:33 PM
Hi again. Thanks for the reply 0xC0000005.
I'm afraid it still isn't working - when I call the operator the program hangs. When I try to 'cout << X+Y;' for example, there doesn't seem to be a...
December 2nd, 2008 06:46 AM
Yeah, that's much better. Hopefully you can also see now that the values for add1, add2, sub1 and sub2 are assigned outside the loop. You need to assign new values each time the loop runs, so go ...
December 2nd, 2008 06:31 AM
Hi petter - Thanks for the reply. I had missed that, but that's not the issue anyway. I've cleaned it up a bit, could you have another look?
float_seq &operator+(const float_seq...
December 1st, 2008 07:38 PM
I think you want to enclose the entire switch statement in a 'while' loop, like this:
while (switch!=5) // while switch is not '5'...
{
cout << " Geometry...
December 1st, 2008 07:26 PM
Hi. I've got a problem with this addition operator, that's supposed to concatenate two class objects containing arrays, like so:
c=a+b
where: c.data[15] = a.data[7] +...
December 1st, 2008 11:57 AM
I like it!! ... That makes a lot of sense.
Paul, Skizmo - Thank you both for your comments!
December 1st, 2008 09:11 AM
Thanks for the reply!
I think I've got it working properly now, but if you could glance over it and check I'd be grateful.
float_seq &operator=(const float_seq &a) //'=' OPERATOR....
December 1st, 2008 06:52 AM
Hi. Can someone please point out what's wrong with my "=" operator for this class? As it stands, it doesn't seem to do anything.
Any help would be greatly appreciated!
#include <iostream>...
Click Here to Expand Forum to Full Width