#include<string .h>
int count=0;
class record
 char name[20]
 int age;
 int id;
 char sex;
  void addrecord();
  void display();
  int getid();
  void editrecor();
  viod search();
  void delet();
2 Years
Discussion Span
Last Post by JamesCherrill

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.

Edited by Moschops


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.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.