All pastes #161280 Raw Edit

Anonymous

public cpp v1 · immutable
·published 2006-09-05 07:14 UTC
rendered paste body
#include "iostream"using namespace std;int main(){        string First ;        string Last ;        int Born ;        int Now ;        string Year ;        string Sex ;        string Married ;        string Name ;        cout << "Your first name : " ;        cin >> First ;        First[0] = toupper(First[0]);        cout << "Your last name : " ;        cin >> Last ;        Last[0] = toupper(Last[0]);        cout << "What year were you born ? (i.e. 1979) : " ;        cin >> Born ;        cout << "What year is it now ? (i.e. 2006) : " ;        cin >> Now ;        Age = Now - Born ;        if (Age == 1)        {                Year = "year" ;        }        else        {                Year = "years" ;        }        cout << "Your sex [m/f] : " ;        cin >> Sex ;        if (Sex == f && Age > 16)        {                cout << "Are you currently married ? [y/n] ;                        cin >> Married ;        }        else        {                cout << "I don't suppose you're married" << endl ;        }        cout << "What year is it now ? (i.e. 2006) :" ;        cin >> Now ;        if (Sex == m && Age > 13)        {                Name = "Mr. " ;        }        else        {                Name = "Young. " ;        }        if (Sex == f && Married == y)        {                Name = "Mrs. " ;        }        else        {                Name = "Ms. " ;        }        cout << "Hello again " <<  Name << " " << Last << "," << endl ;        cout << First << ", you're " << Age << " " << Year << " old." << endl ;        return 0;}These are the errors I'm gettingtest.cc:42: error: missing terminating " charactertest.cc: In function ‘int main()’:test.cc:27: error: ‘Age’ was not declared in this scopetest.cc:40: error: ‘f’ was not declared in this scopetest.cc:43: error: no match for ‘operator>>’ in ‘std::cout. std::basic_ostream<_CharT, _Traits>::operator<< [with _CharT = char, _Traits = std::char_traits<char>](((const void*)std::cin.std::basic_istream<char, std::char_traits<char> >::<anonymous>.std::basic_ios<_CharT, _Traits>::operator void* [with _CharT = char, _Traits = std::char_traits<char>]())) >> Married’test.cc:53: error: ‘m’ was not declared in this scopetest.cc:62: error: ‘f’ was not declared in this scopetest.cc:62: error: ‘y’ was not declared in this scope