Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

help

Name: curry 2011-02-11 5:29

need help

create a structure named Shirt that has the public data members CollarSize and SleeveLength. Create a structure named Pants that has the public data members waistSize and inSeam. Write a program that declares one object of each type Shirt and Pants and assigns values to the objects' data fields. write two overloaded functions named displayClothingFat(). One version of the function takes a Shirt object as a parameter; the other version takes a Pants object. Each version displays the facts about the piece of clothing. Your main() funcition should demonstrate that you can call displayClothingFacts() with either type of clothing.


here is what i have it does not compile because i am complete noob

#include <iostream>
#include <sstream>

#include <iomanip>


using std::cout;
using std::cin;
using std::endl;

 struct Shirt
{
    double collarSize;
    double sleeveLenth;

};


 struct Pants
{
    double waistSize;
    double inSeam;

};



int main()
{
    Shirt b1;
        Pants b2;
    b1.collarSize;
    b1.sleeveLenth;
    b2.inSeam;
    b2.waistSize;

          void displayClothingFacts(b1);

    void displayClothingFacts(b2);
}

Name: Anonymous 2011-02-11 6:36

>>5
[u]mailto: noko[u]

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List