I'm doing a Dress class by using header and cpp files. When I develop the codes for both my header(given) and cpp files and wanted to compile them, I have an error on my cpp file, line 6,"Dress::Dress(string m, string st, int sz, double p". The second mentioned "Dress" is underlined in red which is undertstood to have an error in C++. May I know why is it underlined?
This is my header file.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#pragma once
#include <iostream>
#include <string>
usingnamespace std;
class Dress
{
private:
string material;
int size;
string style;
double price;
public:
Dress(string = "", int = 0, string = "", double = 0.0);
void displayDress();
double getPrice();
};