THE BORE

General => The Superdeep Borehole => Topic started by: Madrun Badrun on October 03, 2008, 01:33:10 AM

Title: C++ help
Post by: Madrun Badrun on October 03, 2008, 01:33:10 AM
I have

Code: [Select]
#include <iostream>
using namespace std;

int main()
{

float bodyHair = 0;
float weirdTallents = 0;
float socialIneptitude = 0;
float likeTravel = 0;
float carnyAverage = 0;
char animals;
char midgets ;

cout << "This program tests if you are applicable to do a certian job.";
cout << "How cofortable would you be in having tp travel for your work? (out of 10)";
cin >> likeTravel;

cout << "How cofortable would you be in working with animals? (Y/N)";
cin >> animals;

cout << "How would you rate your social skills? With 1 being poor and ten being good. ";
cin >> socialIneptitude;

cout << "Do you have any weird tallent?  With 1 being none and 10 being lots";
cin >> weirdTallents;

cout << "How much body hair do you have?  With 1 being litte and 10 being yetiish. ";
cin >> bodyHair;


carnyAverage = ((likeTravel + weirdTallents + bodyHair)/3) - socialIneptitude;

If (carnyAverage > 7)
If (animals == 'y' or animals == 'Y')
{
cout << "..And how cofortable would you be in working with midgets? (Y/N)";
cin >> midgets;

If (midgets == 'y' or midgets == 'Y')
{
cout << "You are perfect for carnival work!";
}
}
else
cout << "You are almost perfect for carnival work.";


else if (carnyAverage > 5)
{
cout << "You need to grow out your sholder hair a bit.  Sorry";
}

else if (carnyAverage > 3)
{
cout << "Need some travel experiance before we can accept you";
}

else
cout << "You could run for president.  Too bad.";



return 0;
}

I get these errors

implicit deceleration on line 43, and parse errors on 44 and 49. 
Title: Re: C++ help
Post by: Vizzys on October 03, 2008, 01:35:04 AM
with your spelling skills are you sure coding is the right job for you?
Title: Re: C++ help
Post by: Madrun Badrun on October 03, 2008, 01:39:43 AM
HELP ME  :'( :'( :'(
Title: Re: C++ help
Post by: Vizzys on October 03, 2008, 01:40:40 AM
I dont know anything like this
Title: Re: C++ help
Post by: Madrun Badrun on October 03, 2008, 01:55:39 AM
arrrrrrr

if not If   FUCKERS!


still have parse errors  :'(
Title: Re: C++ help
Post by: demi on October 03, 2008, 02:22:13 AM
that's full of soooo many typos my head is spinning
Title: Re: C++ help
Post by: Madrun Badrun on October 03, 2008, 02:31:23 AM
that's full of soooo many typos my head is spinning

but my typos are consistent! 

Finally figured it out.  For some reason it doesn't like using "and" or "or" as logical operators but instead needs "&&" and "||"  WTF?
Title: Re: C++ help
Post by: Tundra on October 03, 2008, 04:09:46 AM
that's full of soooo many typos my head is spinning

but my typos are consistent! 

Finally figured it out.  For some reason it doesn't like using "and" or "or" as logical operators but instead needs "&&" and "||"  WTF?

Well, it's C. Get used to it and lots of other funny stuff. After coding C for over 14 years, i still see expressions i have never seen before.
 
And with C++ it's even worse.
Title: Re: C++ help
Post by: Tauntaun on October 03, 2008, 08:56:08 AM
with your spelling skills are you sure coding is the right job for you?

 :lol
Title: Re: C++ help
Post by: Bocsius on October 03, 2008, 09:05:18 AM
C/C++/C#/Java is not VB. Case matters. If != if.

Speaking of which, don't try to use <> to specify !=. != is !=. && is &&, || is ||, != is !=. Got it? Good.
Title: Re: C++ help
Post by: T-Short on October 03, 2008, 09:24:14 AM
Finally figured it out.  For some reason it doesn't like using "and" or "or" as logical operators but instead needs "&&" and "||"  WTF?

It's not plaintext dood, of course it will use those boolean operators.
Title: Re: C++ help
Post by: Madrun Badrun on October 03, 2008, 09:42:42 AM
Finally figured it out.  For some reason it doesn't like using "and" or "or" as logical operators but instead needs "&&" and "||"  WTF?

It's not plaintext dood, of course it will use those boolean operators.

But "and" worked at school just fine, and I'm using the same compiler here.


I already miss simple VB  :'(