0

i got an error mesg (undefine symbol _ main in c0.asm)
plz find and correct the error
i need it urgently plx help me

#include <iostream.h>
#include <iomanip.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>


#include <fstream.h>


#ifndef ADDRESSBOOK_H
#define ADDRESSBOOK_H
void main()
{
class AddressBook    {                 

   protected:

      int  recordID;
      char Name[30];
      char telephone[20];
      char email[30];  

   public:
      AddressBook() ;
      ~AddressBook() ;
      void DisplayData( int n )  ; // Display all records in the file
      void AddRec( int n )  ;      // Add a new record to the file
      void DeleteRec( int n )  ;   // Delete a record from the file
      void UpdateRec( int ) ;      // Get data to update a record 
      void UpdateData( long n) ;   // Update dat in the file
      void InitData() ;            // init file with records
      void ReadData(int);          // read record from file
      void WriteData();            // write record to file
      static int RecordCount();    // return number of records in file

};

#endif
}

Edited by mike_2000_17: Fixed formatting

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by Banfa
0

main returns int not void

The actual error indicates that the linker was unable to find the main to link to the start-up code.

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.