Question: #pragma once using namespace std; #include #ifndef Name _ H #define Name _ H class CommonName; class Name { private: int nextname; CommonName * NAMEPAIRS
#pragma once
using namespace std;
#include
#ifndef NameH
#define NameH
class CommonName;
class Name
private:
int nextname;
CommonName NAMEPAIRS nullptr ;
void findRecursivestring name, int low, int high
public:
Name default constructor;
nextname ;
void addNameCommonName pair
NAMEPAIRSnextname pair;
nextname;
void sortNames
int findLinearstring name
int found ;
int n ;
for int i ; i n; i
if NAMEPAIRSigetName name
found i;
break;
return found;
int findBinarystring name
;
class CommonName : public Name
private:
int ordinal;
string name;
public:
CommonName
CommonNameint ord, string aName
ordinal ord;
name aName;
int getOrdinal
return ordinal;
string getName
return name;
;
#endif
I am getting error use of undefined type CommonName on my find linear function
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
