~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Kid, look before you leap lest you should fall in trouble over it someday.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

egomaniac -> selfless

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Big-bellied, aluminum, JUNK mice are salivating over delicious marshmallows, easily.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

"Green trousers, sheesh"

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Yes Raye that's what I meant, thanks for clarifications in my absence.

It doesn't make sense to make PI a local variable when you are better off writing it as a constant. And as far as academic and small time purposes are concerned, I would write something like: const double PI = 22 / 7.0 ; .

Hassle free (you don't have to keep writing all those decimal numbers) and makes much more sense. Though in real life you would be using a value of PI hardcoded somewhere in one of your header files having much more precision. (Its a pity cmath library doesn't have this like Java and other languages do)

I was aware of that possibility, but maybe better wording would have helped. (Such as "why are you using a variable to store pi when it never changes... *hint*")

So in short, pulling my leg, eh.. ? :D

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Big-bellied, aluminum, robot mice are fighting over DELICIOUS wires, easily.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

fake their identity

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Changed attitude can sometimes be attributed to mood swings.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Input is what I can give, acting on it is one's own decision. :D

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

You get to see your name in it.

I put in a globe. ;)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

and try not

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Powerslave -> Megalomaniac

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

You get Legolas from LOTR.

I put in an arrow.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Guillotine -> Hallowed be thy name

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Ponder on it all you want, its the practicing of such things which matters in the end..

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Walk away -> Theory of a deadman

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

You get an elven archer.

I put in a goat.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

It's very easy to convince me of things I already believe. :)

Oh come on, I wouldn't try to convince you of things you already know. It was just for the other people who would stumble across this thread -- there has got to be a conclusion, don't you think so...;)

I guessed so since I'm not that old, I don't have kids, and...yea.

Sorry if it completely ruffled you, just was a small joke for Aia since he / she was so impressed by you...thought would give him / her a good scare, but I turned out to be quite the reverse I guess. :)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Does the fact that controversies do stem from ignorance sound ridiculous to you ?

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Invisible -> Hollow man

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

old man, "Do

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

I don't think using there is anything wrong with using continue and break keywords -- though there is a lot of controversy surrounding goto statement. (which is extremely biased since even goto is good if used properly). Well the only thing I can think against break , continue or goto is that they break the program flow and result in unstructured program flow....

In your program you can easily eliminate the need for continue by checking otherwise of what you are currently doing i.e.

if( tolower( choice ) == 'n' )
{
    quit = true ;
}

Though I really would recommend using a switch statement and delegating your computing logic to functions which would be in turn called inside your switch construct.

Also if you will notice, there is a lot of repeating code in your program. I would leave the "removal of repetitive code" entirely to you... I have given you the hint. ;)

Also I believe it would be better if you initialized your variables while declaring them to avoid some subtle bugs. Any reason you are hardcoding the value of PI when there are better ways of achieving the same effect....

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

but I do agree that those are the two right ways to define main. :)

Point very well driven home I guess....:D

;)

Did I forget to mention I was joking....oh wait yes I did forget *drats*...:mrgreen:

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

and moving on.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

and over again

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Recourse sounds very much like race course.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

It is because you are reseeding the random number generator and in the attempt restarting it. You need to seed the random number generator only once for a single run. Remove the second instance of srand( ( unsigned ) time( 0 ) ) and you should be fine.

And btw, what's up with the redundant loops ? Maybe you wanted to make the program loop infinitely and to exit based on the choice entered by the user ? You can try something like:

int choice = 1 ;
while( choice )
{
    // your code here

   cout << "Do you want to continue ? ( 0 to exit ) " ;
   cin >> choice ;
}

And yeah, use proper code tags, don't color your code, the highlighting is automatically taken care by the code tags. Just paste your code within code tags.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Doings has trapped me, I couldn't think of a sentence starting with doings and so to get back, I will make you start a sentence with globe. ;)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

we must keep

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

John Wayne Gacy -> Anonymous

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Fear is nothing but a reflection of our wrong doings...

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Thick-bellied, aluminum robot mice are nibbling over burning wires, EASILY.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

forget the past

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

what the consequences

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

I don't know a lot about codecs, maybe Joey would have something enlightning to say on this, but just a recommendation -- try VLC player. Most of the people on the internet recommend since it comes packaged with all the codecs required to play most of the type of video files.

Uninstall all the third party codecs you have installed on your computer and try playing the face.avi with VLC and see if it works. Its worth an effort since we have tried out most of the things and come up against a brick wall....

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

without even bothering

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Trolls are vicious creatures.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Only for a declaration. For a definition an empty pair of parentheses really does mean zero parameters.

I don't think so, atleast not in C -- take a look at this program and compile it using a C compiler.

int add1( )
{
    return 1 ;
}

int add2( void )
{
    return 1 ;
}

int main( void )
{
    int sum1 = 0 ;
    int sum2 = 0 ;

    sum1 = add1( 1, 2, 3 ) ;  // silently ignored...
    sum2 = add2( 1, 2, 3 ) ;  // raises an error
    
    return 0 ;
}

An extract from C99 standard clause 6.5.2.2

If the expression that denotes the called function has a type that includes a prototype, the number of arguments shall agree with the number of parameters. Each argument shall have a type such that its value may be assigned to an object with the unqualified version of the type of its corresponding parameter.

So if you use int main( ) you can very well do something like:

int main( )
{
    if( 0 )
        main( 'a', 'b', 'x', "more crap" ) ;
   
    return 0 ;
}

...which actually shouldn't be allowed and doesn't make sense either.

Thus the only correct way of using main is :

  • int main( void )
  • int main( int argc, char* argv[] )

Anything else is implementation defined and though it will may get documented by the compiler writer, but since they are …

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

do such a

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Psycho -> Maniac

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

in response to

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Horizon fading, or is it an overdose of Cocaine taking its toll.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

we all are

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

mental illness -> Paranoid

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Thick-browed, greedy robot mice are NIBBLING over burning wires hungrily.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

You need to tell us exactly the errors you are getting and where.

As far as your first program is considered, you need to initialize the variables at the top of your program, since without that while(score<= 100 && score >=0) becomes meaningless. sum= 0+score What is this statement supposed to do ? It just adds zero to score and assigns it to LHS ie sum. Maybe you wanted sum = sum + score or sum += score In your second program :

// wrong way to declare a function
// you need to specify the return type and the 
// number and type of function parameters...

// int average( int, int ) ; would be more like it
average(X,Y); 

// more code

// ditto here, you need to specify the return type along
// with the type of input parameters along with their names

// int average( int sum, int count ) { /* code * / } would be more like it
average(SUM, COUNT){
return sum/count;
}

Read the comments in the code I posted above for tips.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Thick-browed, greedy robot dogs are SLOBBERING burning wires, hungrily.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

THICK-headed, greedy robot dogs are licking burning wires, hungrily.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

tasty -> noodles

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Topic -- oh yes, I forgot this thread doesn't have a topic.