#include<iostream.h>
#include<conio.h>
#include<string .h>
int count=0;
class record
{
private:
 char name[20]
 int age;
 int id;
 char sex;
 public:
  void addrecord();
  void display();
  int getid();
  void editrecor();
  viod search();
  void delet();
  }

I would not call this C++. If I had to describe it, I might use the phrase "C++" but I would explain it's some kind of primitive, old dialect.

Use proper C++ strings. Don't use char arrays.

Don't use conio.h, unless the year is 1993 and you're coding for MS DOS (the year is not 1993, and you are almost certainly not coding for DOS).

Don't use <iostream.h> unless the year is 1995; it has been standardised as <iostream> since at least 1998.

I can't comment on the C++, but as an OO design it seems to confuse two different objects.
You have a Person type (calling it "Record" is just unhelpful). Each Person has a name etc, and methods for accessing its attributes.
But then you have addRecord, search etc which make no sense as methods for an individual Person. They imply that you also have some Object that contains a number of Persons (eg Company, College, Team etc), and methods like addPerson or search should be defined in that Object, not in Person.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.