twomers 408 Posting Virtuoso

I prefer to keep an open mind at all times, but what the hay, I hate apple too! Well, not so much hate as "I don't have an iPod".

I feel we're having a moment.

twomers 408 Posting Virtuoso

>> Quite possibly, it is simply another form of matter.. An anti-matter

I don't think so. I remember being fascinated about what my physics teacher (don't judge him because of the gravity definition he gave us, media player thread), said about what would happen if matter man and an anti-matter man met and shook hands ...

Considering this effect if 96% of the universe was anti matter and this four percent that we perceive is matter ... the universe, logically, should be a much more violent place.

Christina>you, what church do you go to. Sounds interesting :)

twomers 408 Posting Virtuoso

>> It might be billions of years before they evolve into reasonably intelligent beings.
That's assuming your system accepts evolution :)

No matter how you try to do it, your system will ALWAYS have shortcomings. Linearity is always nice, but nature has a nasty ol' habit of making everything so complicated and the linearity it sometimes exhibits only holds over certain ranges. In fact, it only holds over those discrete ranges "to a good engineering approximation", which is to say that it isn't linear at all but nearly linear. Which makes things hard to model, predict etc.

>> The moon would not need to be created until people first saw it!
I give them a month.

Unless you're being sarcastic, Strum, I'm going to have to completely disagree with you. The OP suggested a perfect representation of the future defined by reactions, forces and time. You put forward a vague representation of the earth without humans or the moon (I know I'm exaggerating, but that's the point). No matter how small the influence it still remains as such - an influence, therefore it's relivant.

We like linear. It's easy.

twomers 408 Posting Virtuoso

>> As for apple, I just hate them b/c I hate all their products.
Haha. That's the best justification of anything I've heard. It's like when I was in school and my teacher gave us a definition of Gravity (Physics teacher), and the definition itself used the term 'Gravity' to describe itself! Crazy, eh? I don't like apple (cause I don't have an iPod ;)), but I recognise that their products are good. Sure they have made mistakes (bad nanos?), but iPods are probably the leaders of the portable music player.

I like WMP. I think it can do pretty much everything that iTunes can (aside from the fancy album scrolling thing which is neat). The thing is that's visual. Who cares what it looks like? You don't need to look at the computer, just listen to what it gives you. Sure easy navigation is necessary but they both have that - they probably spent enough to buy it. You have to get used to a program either way. Regardless if it's iTunes or WMP at first it's awkward but eventually you get used to it and grow to love it. Does it matter which you get used to? Visual impacts don't add a whole bunch to your listening experience. As I've said I've only used WMP but have seen iTunes. I haven't seen anything iTunes can do which WMP can't. I'm sure if one of them gets a new feature the other will mimic it under a …

twomers 408 Posting Virtuoso

I think your argument assumes that there is no interaction with anything. That we are lone wolves in the snowy mountains of the concrete future is not the case. Suppose I punch you in the head - there is a chemical reaction that takes place (you get a headache, sorry). Had I not been there you would not have had to take asprin (I hit hard :)). While one could argue that it was written in me chemically from my conception that I would hit you in the head ... the laws of life the universe and everything are too obscure for this sort of pre-destiny to occur ... I think it's far too unlikely.

Neat idea, though. You could write an interesting book out of it if you wanted to - people 'program' their babies to have certain careers from conception ... but the heroes of Daniweb come and save the day through the use of cunning algorithms, fast thinking and a determination that says "we don't give up".

twomers 408 Posting Virtuoso

3 :| I don't like scoring low in tests. I wanna take it again. I failed miserably :'( Anyone here give grinds???

twomers 408 Posting Virtuoso

Why are you bothering making the radius a pointer? It adds unnecessary complications ... not complications really, but there's no need.

using namespace std;

class Circle
{
private:
    int mRadius;

public:
    Circle();
    Circle(int n);
    Circle(const Circle &rhs);
    ~Circle();
    
    Circle operator = (const Circle &rhs);
    Circle operator++();
    Circle operator++(int);

    int getRadius() const {return mRadius;}
    void setRadius(int n) {mRadius=n;}
};

Circle::Circle()
    : mRadius( 5 )
{}

Circle::Circle(int n)
    : mRadius( n )
{}

Circle::Circle(const Circle &rhs)
    : mRadius( rhs.mRadius )
{}

Circle::~Circle()
{}

Circle Circle::operator++()
{
    mRadius++;
    return *this;
}
Circle Circle::operator++(int)
{
    mRadius++;
    return *this;
}
Circle Circle::operator = (const Circle &rhs)
{
    if( this == &rhs )
        return *this;

    mRadius = rhs.mRadius; // Friendly functions :)
    
    return rhs;
}

int main( void )
{
    Circle circ1;
    cout<< circ1.getRadius() <<"\n";

    Circle circ2(8);

    circ1=circ2;
    cout<< circ1.getRadius() <<"\n";

    ++circ1;
    cout<< circ1.getRadius() <<"\n";

    circ1++;
    cout<< circ1.getRadius() <<"\n";
    
    return 0;
}

Well. This is all your code without your pointer int. That isn't a requirement for your assignment is it? It gets rid of the need for a destructor and the need for new etc. I also threw in some initialisation list stuff and made use of the fact that instances are friends with eachother so you don't need to use the get radius method to access the radius.

twomers 408 Posting Virtuoso

>> Close enough.
I think I made it up :p You really think that happened.

>> Umm ... huh? Am I missing something?
I don't think so. Ask me later. I might make something up - I'm too hungry now.

twomers 408 Posting Virtuoso

That's true, but it was cboard where we met first on that cold october night. My car broke down and I was trapped so I knocked on a stranger's door. You not only let me use your phone but gave me some tea too!

Or at least that's how I remember it.

twomers 408 Posting Virtuoso
#include <stdio.h>
  
int main()
{
  char drinkchoice;  /* ... */

  if(drinkchoice == 1)
    printf("here is you coke");
  if(drinkchoice == 2)
    printf("here is your sprite");
  if(drinkchoice == 3)
    printf("here is your dr pepper");
   
  /* ... */
}

Your problem lies here. You have chosen the drinkchoice as a character variable. Now. For if statements you need to have matching types for the left and right hand side of the == operator. If you look at the above code you can see that what's on the left is a character, as you have defined at the start, but what's on the right is actually a number. There are two ways you can go about modifying your code to make it work -

  1. change the type of drinkchoice to int, ie -- int drinkchoice;, and it should work.
  2. change the second (ie right hand side), parameters to a character, ie -- if ( drinkchoice == '1' ) { ... }

The ' which wrap around the number show you that it's a character.
You can, however, work with numbers in the if() statements, if you really want to. If you look at an ASCII table you can see the positioning of each letter with reference to two hex values. Use the hex value in the if statement, ie the number 1 (as a character), is 0x31 or the decimal equivalent of that.

twomers 408 Posting Virtuoso

>> btw it's version 11 now iTunes is summit like 7.2 is it?

Yes, which obviously means WMP is better :)

twomers 408 Posting Virtuoso

I know. But I was informing the OP that there is an option to use a rhs and lhs parameter if he really wanted to.

twomers 408 Posting Virtuoso

>> WMP is a piece of junk.. iTunes is the best.
Justify that! You can't just say something like that without giving any shred of proof to support your view!

>> AFAIK WMP doesn't have anything of that sort.
I think you can. It's called "Auto Playlists", and you can insert cite certain criteria which specifies the songs which make it onto the playlist.

I personally like WMP better, but that's only cause I have only used WMP properly. I have seen iTunes. It looks OK. I think WMP 10 (or is it 11? I can't remember which is the newest version), has most of the useful functionality that iTunes has.

John A commented: Gotta love common sense. +13
twomers 408 Posting Virtuoso

I normally answer 'em. It depends on the content of the poll ... well it really doesn't now that I think about it. I think I just answer them regardless. It takes two extra clicks. No keyboard required. One finger. Though I suppose the precise positioning of the cursor to the little circles and thence to the "vote" button requires a lot of concentration which the user might not be up for depending on how they feel.

I think I like polls too.

twomers 408 Posting Virtuoso

That is true, but let us not forget that you can also do friend operator overloading with a rhs and lhs parameters -

namespace twomers
{
    class coord
    {
    private:
        int x, y;

    public:
        coord ()
        {}

        coord( const int n_x, const int n_y )
            : x( n_x ), y( n_y )
        {}

        friend std::ostream &operator << ( std::ostream &os, const twomers::coord &inst )
        {
            return os << "x: " << inst.x << ", y: " << inst.y << std::endl;
        }

//        twomers::coord operator + ( const coord &param ) // Have either this commented
//        {
//            coord temp( x+param.x, y+param.y );            
//            return temp;
//        }
        friend coord operator + ( const coord &rhs, const coord &lhs ); // or this
    };

    twomers::coord operator + ( const coord &rhs, const coord &lhs ) // and this
    {
        coord temp( lhs.x+rhs.x, lhs.y+rhs.y );            
        return temp;
    }
}

int main( void )
{
    twomers::coord x( 1, 1 );
    twomers::coord y( 3, 4 );
    twomers::coord s;

    s = x+y;

    std::cout<< x << y << s;

    return 0;
}

Just another method if you wanted to use the two-parameter model instead of the single one for some reason.

twomers 408 Posting Virtuoso

On CD they're impressionable, but their live stuff is unbelieveable. They can all just play in synch and what they're doing (obviously not all of it), is improvisation and it sounds so great.

My fav songs ... (I also like som Neil Young stuff and Paco de Lucia), Possibly sultans of swing (I sometimes play gigs and I do a cool acoustic version of it), Comfortably Numb, Brothers in Arms, When the Levee Breaks, and Since I've Been Loving You.

twomers 408 Posting Virtuoso

>> I absolutely love Led Zeppelin.

The thing that's so great about them is that they have so many different sounds. They can (could :( Why do my favourite artists/bands break up because of death :( ), pull off nearly any sound! In contrast with lots of other bands ...

Oh, anyone ever listen to Hayseed Dixie :D

twomers 408 Posting Virtuoso

I've recognised a number of names here from cboard (I migrated from there), alright. I think that's where he knows me from. Thanks for your welcomes.

twomers 408 Posting Virtuoso

Well, this is going to be a long list. I like lots of different styles of music ... in no specific order (other than as they come to me) -


Led Zeppelin (they probably are my fav band), Rodrigo y Gabriella, Dire Straits, Hendrix (sometimes), Damien Rice (not his recent stuff), Eric Clapton,Sigur Ros (of late), Pink Floyd, Alice in Chains, AC DC (sometimes), Audioslave, Blur (Think Tank is awsome), Jeff Buckley (I wish he didn't die :( ), Portishead (sometimes), Queen are OK, there are probably lots more, but I can't think of any. Heh. I just realised I went through that alphabetically (ish) after Pink Floyd.

I've also been known to listen to Ludwig Van (Started calling him that now - watched A Clockwork Orange last night). Oh, and of course my own stuff :)

twomers 408 Posting Virtuoso

I never needed braces. Just had a 'perfect' set of teeth, apparently. So mine also cost €0, which is probably less than £0, still more than $0, but certainly less than seven grand! :) I never liked the idea of braces anyways. Do you need to wear a retainer forever after you get the braces off so your teeth don't fall back into their original position? Or at least revert to a more unsavory position?

My sister lost her retainer in Paris one time and never went about getting another one for some reason. I think he teeth stayed in the same position. This was about a year ago.

twomers 408 Posting Virtuoso
#include <stdio.h>
 
int main()
{
 char drinkchoice;
  float insert;
  float money;
  float totalinsert;
  
 /* ... */
 if(insert < money)
 /* ... */
 if(totalinsert < money)
 /* ... */
 if(totalinsert < money)
 /* ... */
 if(totalinsert < money)
 /* ... */
 if(totalinsert == money)
  
 getchar();
 return 0;
}

It's never really a good idea to use variables which are uninitialised . In the first statement what's "money"? The value of money I mean. You should initialise on declaration of sometime before use:

float money = 24;
float somethingelse;

somethingelse = money-3;

/* etc */
twomers 408 Posting Virtuoso
void TWQ::getD(AnsiString carNo,Node DInQ[],int& size) 
{
     aQ=current->getDQ();

    aQ.getElement(i+1,nameIn);
    DInQ[i].getName();
}

Pseudo-code is pretty much a more readable way of printing real code. I find it kind of amusing that you can write the code but have difficulty in writing the psuedo-code :) Normally it's the other way around.

I'm assuming this code runs as you expect.

As such, referring to my brief definition of pseudo-code, it's kind of hard to determine the actual function of the function. If you give us a brief description of what the functions themselves do we will be able to help you. But to be honest if you can do that you shouldn't have any problems writing the pseudo-code anyway!

note: It's always easier when functions have useful names. Not that yours aren't called correctly, I don't know, but by useful I meant that everyone could understand their purpose from reading the code snippet.

twomers 408 Posting Virtuoso

I've been hearing a lot of things (mainly good ... in fact mostly good), about Daniweb, so I finally decided to join ... I'd better not be disappointed now :)

I'm 'twomers'. I'm a third year student studying elec eng. 21. A guy (it's always good to clear that one up - text as means of gender indication is not always foolproof). Erm ... have I left out anything?

Do I know anyone here?

arjunsasidharan commented: welcome +3
joshSCH commented: Electrical Engineering.. sweet =) +6
Geek 8-) commented: Welcome to daniweb, I'm new too! +1