d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > C++ Confusion With Classes/structs > Syntax Issues.
Add Reply New Topic New Poll
Member
Posts: 23,516
Joined: Aug 3 2011
Gold: 3,575.00
Oct 26 2016 10:32am
Alright basically I have an HPP file and a CPP file.
I have a struct and a class.

Struct perSay
{
int nub;
double dub;
perSay *do;
};

class iDk{
private:
perSay *omGptr;
public:
iDk(); // constructor
iDk(int b, c);
}

Etc. etc.

I need to create the definitions of overloading etc but I can't even start off as I don't know how to reference them in the CPP file.
I've tried... perSay::iDk()
iDk::iDk()

but none of it works. I don't understand the syntax. What do I do!?
Member
Posts: 23,516
Joined: Aug 3 2011
Gold: 3,575.00
Oct 26 2016 11:40am
Close thread please, I figured it out. Simply forgot to add the #include hpp into the cpp, thought it would automatically recognize it -_-
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll