need Help With Functions Plz goin crazy

don need answers just need guidance

Page 1 of 1

0 Replies - 1141 Views - Last Post: 08 May 2007 - 09:20 AM Rate Topic: -----

#1 Flash0429   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 19
  • Joined: 08-May 07

need Help With Functions Plz goin crazy

Post icon  Posted 08 May 2007 - 09:20 AM

i need help i have a program i have to create called birthday profile i was able to do the first part but im stuck on the next part we had to creat an enumeration for the month of the year wich i did and an enimeration for the birthstones wich i did but than it says to add a function named getbirthstone that returns the birtstone based on the month using the following birthstones:

then it says to add code to call the function when the user selects the Display Information option. for now, hard code the month in the function call to your birth month. add a menu item to the main menu to display all birthstones. add code to call getbirthstone for each month.

im not sure how to do any of this here is my header file:
enum month { January, Febuary, March, April, May, June, July, August, September, October, November, December };
enum birthstone { garnet, amethyst, aquamarine, diamond, emerald, pearl, ruby, peridot, sapphire, opal, topaz, turquoise };

birthstone getbirthstone();
void mainMenu()

and here is my .cpp file
// BirthdayInfo.cpp : Defines the entry point for the console application.

#include "stdafx.h"

#include "BirthdayInfo.h"

#include <string>

#include <iostream>

using namespace std;

int menu;
string name;
string space (6, ' ');

char diamonds = 4;

void mainMenu()
	system ("cls");
	cout << "Hello, " << name << "\n" << endl;
	int x=1;
	int y=1;

	while (x<=5)
		cout << space << diamonds;

	cout << "\n\n****************Main Menu****************" << endl;
	cout << "1) Display Information\n" << "2)\n" << endl;

	while (x<=5)
		cout << space << diamonds;

	cout << "\n";
	cin >> menu;


int _tmain(int argc, _TCHAR* argv[])
	cout << "What is your name?" << endl;
	getline (cin, name, '\n');
	return 0;

if someone can help me with any of this i would greatly appreciate it thx i dont need someone to give me the entire thing i just need some one to steer me in the right path to help me out a bit thx

This post has been edited by Flash0429: 08 May 2007 - 05:34 PM

Is This A Good Question/Topic? 0
  • +

Page 1 of 1