twomers 408 Posting Virtuoso

Cause
if ((temp * temp) == j)

returns false?

twomers 408 Posting Virtuoso

On a freakin' bicycle!!

twomers 408 Posting Virtuoso

What you've gotta remember is that there you're going to have to delete the pointer to second in first's member destructer - unless I've misunderstood whenever you use new you must use delete. So because second is allocated in first (dynamically), you do indeed need to delete it in first. That's not to be mistaken with destructing second which is managed by second's own destructor. Try this:

class first {
private:

public:
  first( void ) {
  }

  ~first( void ) {
    std::cout<< "First's destructor!\n";
  }
};

class second {
private:
  first *fir;

public:
  second( void )
    : fir( new first ) {
  }
  ~second ( void ) {
    std::cout<< "Second's destructor!\n";
    delete fir;
  }
};

int main( void ) {
  second sec;
}

which tells you that both first and second's destructors are both called! That make sense?

twomers 408 Posting Virtuoso

Did I when? I attend at present so yes. (it's 12 btw :))

Have you watched this year's rugby world cup? Or are you watching at present?

twomers 408 Posting Virtuoso

Sorry. I thought this was in C++ ...

make an array, loop through, and sum:

int total = 0;
int array[ARRAY_SIZE];
/* Fill array with info */

for [0 -> ARRAY_SIZE-1] 
  total = total + array[CURRENT_POSITION]

print "Sum: " total

Obviously that's psuedo code.

twomers 408 Posting Virtuoso

Very good find! It converts them and all... does it work OK?

twomers 408 Posting Virtuoso

Yes (kinda :) my sister sings in her sleep occasionally)

Do you know how many m's there are in mmmmm's alias without counting?

Sulley's Boo commented: :D cute sis you have .. +3
twomers 408 Posting Virtuoso

I do.

Have you ever fallen off a tree?

twomers 408 Posting Virtuoso

I dunno, Dave, .... 60 questions is a lot ... I got bored after question 12 ... I'd do miserably though. I know nothing!

twomers 408 Posting Virtuoso

Yes.

Do you like classical music?

twomers 408 Posting Virtuoso

Well you'll have to initialise all of the variables.

>> if (userGuess == Black || black)
That's not (or rather mightn't), work as you would expect: it'll do the || ing first and then the == (or the other way around, I can't remember), so what you want to do is probably:

if (userGuess==Black || userGuess==black)

Same goes for the other two if's.


You know. I think what you're trying to do is use strings... something like this might work better:

#include <iostream>
#include <iomanip>
#include <cmath>
#include <cstdlib>
#include <ctime>

using namespace std;

int main( void ) {
  //Define variables
  std::string userGuess;
  int EuserGuess, wager;


  // Welcome user and display odds
  cout << "Here are your odds:\n\n";
  cout << " 1 to 1 | Black (Odd Numbers)\n";
  cout << " 1 to 1 | Red (Even Numbers)\n";
  cout << "35 to 1 | Exact Guess..n" << endl;

  //Ask for user input
  cout << "How would you like to place your bet?\n";
  cout << "Black, Red, or Exact: ";
  cin >> userGuess;

  if (userGuess == "black")
    userGuess = "odd";
  else if (userGuess == "red")
    userGuess = "even";
  else if (userGuess == "exact" ) {
    cout << "What number would you like you place your bet(1-36)?";
    cin >> EuserGuess;
  } else {
    cout<< "Error! Exiting";
    return 1;
  }

  cout << "How much would you like to wager?\n";
  cout << "$ ";
  cin >> wager;

  cout << "\n\n\nYou have chosen to wager " << …
twomers 408 Posting Virtuoso

No.

Have you ever used a chain-saw?

twomers 408 Posting Virtuoso

No. Getting there though ... slowly.

Did you know today's Google's 9th birthday?

twomers 408 Posting Virtuoso

OK. Well for section one you should look into the division and remainder operators and loop ... Could be a long loop so think about it and see if there are any tricks you can use.

Section 2 is very similar.

Look at this code:

int main( void ) {
  int num;

  std::cout<< "Enter a number: ";
  std::cin >> num;

  while ( num ) {
    std::cout<< num%10 << " ";
    num /= 10;
  }

  return 0;
}
twomers 408 Posting Virtuoso

Yeah.

Is daniweb helpful? (I'm very suggestive today)

twomers 408 Posting Virtuoso

"An old broom knows the dirty corners best."

twomers 408 Posting Virtuoso

I'm with you, Serunson, but some of these XBox heads are passionate about their controllers!

twomers 408 Posting Virtuoso

Well ... our 'prime minister' just passed a vote of no confidence from the opposition ... There are issues with money that appeared in his account too ... so I guess he has a sense of humour ... :)

twomers 408 Posting Virtuoso

The pee from a cat reeks more than that of a dog, in my experience. My father throws things at cats who go into our garden!

twomers 408 Posting Virtuoso

What kind of stuff do you play on the guitar, Nich? I like to play literally a lot of stuff ... rock, acoustic, flaminco, classical, soul, jazz, classis sega intro songs ... :)

twomers 408 Posting Virtuoso

Yes.

Do you like to wear suits?

twomers 408 Posting Virtuoso

What type is it?

twomers 408 Posting Virtuoso

Love to! Don't do it nearly enough though.

Beards - an investment?

twomers 408 Posting Virtuoso

It depends where you get the book.
I love going to second hand book shops. I love the chaos and the disorder ... but yet, in one that I have in mind, the people who work there know exactly where the books you're looking for are. I mean it. Everytime I've tried searching for a book it's taken at least half an hour to find (if at all). Obviously an advanced sorting algorithm I've never seen.

twomers 408 Posting Virtuoso

I like the cut of your jib - giving yourself a birthday post! Good job & have a gud'n.

twomers 408 Posting Virtuoso

No (can't even spell them :))

Do you feel strongly about not wearing matching socks?

twomers 408 Posting Virtuoso

She's good ...
Best of luck, l.

twomers 408 Posting Virtuoso

It's clearly a code ... she must be testing you!

twomers 408 Posting Virtuoso

>> Digital picture of the right hand (palm) so you can see the line pattern.
That's hardly convenient though. I'm guessing the OP doesn't want to put the users out lest he discourage them from participating.

twomers 408 Posting Virtuoso

As in Body Oder? Well sure I do (I believe everyone does aside from Jean-Baptiste Grenouille). I overpower it though!

Have you ever had insomnia?

twomers 408 Posting Virtuoso

They should. Nor do they make nice books anymore. I mean antique ... that sounds kinda stupid I know but they look cool.

Attached below is a 150 year old version of Dickens' works which I love reading from. It's in tatters, but it's still good. It's also about the size of my torso.

twomers 408 Posting Virtuoso

I reckon the users are going to have to 'register', even if that means a server-side script giving them a unique id number or something rather than their choosing an alias.

But registering doesn't mean a loss of anonymity at all. Registration might just mean something like filling out a form (one which, as best you can, insures it's a real person), and generates a login number for them ... maybe they can choose a password then ... but I guess you don't want login stuff ... just a foolproof 'ishuman' function :)

>> want to find a way to stop multiple registrations by the same person
Even with all the personal info you might want you can't ensure this! I mean all someone has to do is create another email account and use that, for example, in daniweb. Make up a username. And hey presto. Multiple accounts. IP or mac address filtering won't work either as, as you said, more than one person might use the same computer.

>> I'm wondering if anybody has any ideas.
Fingerprints or retina scans ... I'm only guessing but I don't think you want that.

twomers 408 Posting Virtuoso

>> Is anyone here going to get it at one of the midnight things?

Well I did the 'midnight' "thing" when the last HP book came out (by which I mean I had to go shopping and midnight was the only free time I had, was working very hard then), but the queues were far too long so I just went shopping and about two minutes past midnight I heard a woman talking to her son (I think), on a phone but it turns out her son had already gotten the book so she was going to return it ... so I intervened and saved her a walk. What a good citizen I am, eh?

twomers 408 Posting Virtuoso

Image verification? You mean against spam or something?

twomers 408 Posting Virtuoso

Also Dave and myself discovered:

British -- American
Scone -- biscuit
biscuit -- cookie

twomers 408 Posting Virtuoso

Hey.

If anyone here's dating someone they should ask them if they are being dated for their brains or their looks and report back.

twomers 408 Posting Virtuoso

In civilisation (kiddin'), crisps are http://www.dkimages.com/discover/previews/855/45075285.JPG , chips are http://www.nhf.org.nz/images/Chip%20pic.JPG Images are easier to deal with, or so previous discussions have taught me.

twomers 408 Posting Virtuoso

Funnily enough the summer was so bad this year that potato blight is all over the place ... but that said we've grown out of our need for potatoes ... we now eat chips (or fries for y'all in the states), too.

But I did just have some potatoes for dinner :)

twomers 408 Posting Virtuoso

I need food! I'm not eating anything.

twomers 408 Posting Virtuoso

Is it out now? How is it?

twomers 408 Posting Virtuoso

Jaz Hands *scuttles off stage in a diagonal direction*

Some predictable ones, of course, but some good ones too. Jazz is great. I saw a great Jazz guitarest during the summer ... I can't remember the name of him for the life of me ... But if ye ever hear of him I'd recommend seeing him!

twomers 408 Posting Virtuoso

>> They have thier extendable metal hitty stick though.
Good description - http://en.wikipedia.org/wiki/Club_%28law_enforcement%29#Expandable_batons
Same in Ireland, I think. Those things can generate some whip! My sister locked her keys in her car once and a cop was near and she got him to break the window with a flick of the wrist and that baton.

twomers 408 Posting Virtuoso

Tea, cookies and youghurt. In the opposite order.

twomers 408 Posting Virtuoso
twomers 408 Posting Virtuoso

I'm a ninja.

twomers 408 Posting Virtuoso

OK. Maybe the controls aren't actually hard ... I'm just not good at games ... HAPPY?

twomers 408 Posting Virtuoso

Reading, Riting, Rithmitic. Recording, rogramming, ... bettering my knowledge on things I know nothing about which I will never have to know about ... like the liver fluke ... Music. I do a lot of playing recording and listening.

twomers 408 Posting Virtuoso

I love WH! Heathcliff is one of my favourite fictional characters. Did you know that when the book was released a critic reviewed it and said: "How anybody could write a book like that and not commit suicide is beyond me", or something.

twomers 408 Posting Virtuoso

Lasagne, garlic bread, potato wedges and salad.

twomers 408 Posting Virtuoso

4042 and now you would have to catch up on two seasons. Too little time I guess.