Author Topic: C++ help  (Read 732 times)

0 Members and 1 Guest are viewing this topic.

Madrun Badrun

  • twin-anused mascot
  • Senior Member
C++ help
« 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. 

Vizzys

  • green hair connoisseur
  • Senior Member
Re: C++ help
« Reply #1 on: October 03, 2008, 01:35:04 AM »
with your spelling skills are you sure coding is the right job for you?
萌え~

Madrun Badrun

  • twin-anused mascot
  • Senior Member
Re: C++ help
« Reply #2 on: October 03, 2008, 01:39:43 AM »
HELP ME  :'( :'( :'(

Vizzys

  • green hair connoisseur
  • Senior Member
Re: C++ help
« Reply #3 on: October 03, 2008, 01:40:40 AM »
I dont know anything like this
萌え~

Madrun Badrun

  • twin-anused mascot
  • Senior Member
Re: C++ help
« Reply #4 on: October 03, 2008, 01:55:39 AM »
arrrrrrr

if not If   FUCKERS!


still have parse errors  :'(

demi

  • cooler than willco
  • Administrator
Re: C++ help
« Reply #5 on: October 03, 2008, 02:22:13 AM »
that's full of soooo many typos my head is spinning
fat

Madrun Badrun

  • twin-anused mascot
  • Senior Member
Re: C++ help
« Reply #6 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?

Tundra

  • Shower Expert
  • Member
Re: C++ help
« Reply #7 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.
poo

Tauntaun

  • I'm cute, you should be too.
  • Senior Member
Re: C++ help
« Reply #8 on: October 03, 2008, 08:56:08 AM »
with your spelling skills are you sure coding is the right job for you?

 :lol
:)

Bocsius

  • is calmer than you are
  • Senior Member
Re: C++ help
« Reply #9 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.

T-Short

  • hooker strangler
  • Senior Member
Re: C++ help
« Reply #10 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.
地平線

Madrun Badrun

  • twin-anused mascot
  • Senior Member
Re: C++ help
« Reply #11 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  :'(