thsi piece of code says i have no default constructor for class Stock:
#include <iostream>
#include <string>
#include <conio.h>
using namespace std;
char choose;
class Stock
{
public:
Stock( string *, char, int, int );
private:
string name;
char type;
int indexnumber;
int value;
};
Stock::Stock( string *namePtr, char typeS, int indexnumberS, int valueS)
{
name = *namePtr;
type = typeS;
indexnumber = indexnumberS;
value = valueS;
}
I thought I made the constructor.
the error i get is:
c:\documents and settings\administrator\desktop\c++\string test.cpp(49) : error C2512: 'Stock' : no appropriate default constructor available
[edited by - 3dmodelerguy on March 21, 2004 4:19:48 PM]