ok this is whay i have so far and thank you guys for the help. this is the ONLY error i get
.h - header file
Code:
#pragma once
#include <iostream>
using std::endl;
using std::cout;
class Diamond5
{
private: int lengthN;
int lengthI;
int lengthJ;
char symbol;
public:
Diamond5(void);
int getLengthN ();
int getLengthI ();
int getLengthJ ();
char getSymbol ();
~Diamond5(void);
public: Diamond5 (int, char);
public: void printInfo ();
void setLengthN (int);
void setLengthI (int);
void setLengthJ (int);
void setSymbol (char);
}; // end of class definition
and this is the .ccp (not main)
Code:
#include "StdAfx.h"
#include "Diamond5.h"
Diamond5::Diamond5(int n, int i, int j, char s) // constructor that initializes the values of the data members
{
lengthN = n;
lengthI = i;
lengthJ = j;
symbol = s;
}
void Diamond5::printInfo(){
cout << "Enter the character and lenght: " << symbol << endl;
cout << "You have entered an illegal value for the length. It must be between 1 and 21." << lengthN << endl;
}
Diamond5::~Diamond5(void)
{
}
Diamond5::Diamond5(void)
{
}
void Diamond5::setLengthN (int n)
{
lengthN = n;
}
void Diamond5::setLengthI (int i)
{
lengthI = i;
}
void Diamond5::setLengthJ (int j)
{
lengthJ = j;
}
void Diamond5::setSymbol (char s)
{
symbol = s;
}
int Diamond5::getLengthN(){
return lengthN;
}
int Diamond5::getLengthI(){
return lengthI;
}
int Diamond5::getLengthJ(){
return lengthJ;
}
char Diamond5::getSymbol(){
return symbol;
};
THE ERROR IS : error C2511: 'Diamond5:iamond5(int,int,int,char)' : overloaded member function not found in 'Diamond5'
THANK U SO MUCH!
[code]