my code

here is my code which does not work

Page 1 of 1

6 Replies - 923 Views - Last Post: 09 November 2009 - 02:09 AM Rate Topic: -----

#1 aarti118  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 08-November 09

my code

Post icon  Posted 08 November 2009 - 02:02 AM

// Employee.h

#include <iostream>
namespace Records {
  const int kDefaultStartingSalary = 30000;
  class Employee
  {
public:

	  Employee();

	  void	 promote(int inRaiseAmount = 1000);
	  void	 demote(int inDemeritAmount = 1000);
	  void	 hire();	 // hires or re-hires the employee
	  void	 fire();	 // dismisses the employee
	  void	 display();  // outputs employee info to the console

	  // Accessors and setters
	  void		  setFirstName(std::string inFirstName);
	  std::string   getFirstName();
	  void		  setLastName(std::string inLastName);
	  std::string   getLastName();
	  void		  setEmployeeNumber(int inEmployeeNumber);
	  int		   getEmployeeNumber();
	  void		  setSalary(int inNewSalary);
	  int		   getSalary();
	  bool		  getIsHired();
private: 
	  std::string   mFirstName;
	  std::string   mLastName;
	  int		   mEmployeeNumber;
	  int		   mSalary;
	  bool		  fHired;
	};
}




** Edit ** :code:

Is This A Good Question/Topic? 0
  • +

Replies To: my code

#2 aarti118  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 08-November 09

Re: my code

Post icon  Posted 08 November 2009 - 02:04 AM

i have pasted this code thinking that i will edit it once it works but this too doesn't work help please
Was This Post Helpful? 0
  • +
  • -

#3 hackterr  Icon User is offline

  • D.I.C Regular

Reputation: 21
  • View blog
  • Posts: 293
  • Joined: 13-August 09

Re: my code

Posted 08 November 2009 - 02:11 AM

You dont have to solve this problem using programming for one.
you can use some existing packages for this kind of work.
even MS office or openoffice can do this. They simply create a server where multiple users can see or edit a file.
U can even use MS access and its forms utility to automate entry into database and other stuff.Just Explore that option

But if you do wanna create a program for doing this job:

creating a file and manipulating it in excel is a lot of hard work and the excel format changes with every new release of ms excel
I would recommend that you create the database in a CSV format or comma separated format.
In this the program would save values like

employeeId, name , address, Dateofjoining,Employeeleave
123, aarti, 154 lalbagh, 12-03-208,01-03-2009---21-23-2009

ok?

your program would consist of two parts one that is the client and the server
Client:
this would reside on boss's pc
its function would be to access database in your PC and show it to your boss
Second part Server:
this would reside on your PC
its function will be to read your database and send it to your bosses PC when he opens the client on his pc and allow you to edit the database at your PC


:code:

This post has been edited by hackterr: 08 November 2009 - 02:17 AM

Was This Post Helpful? 1
  • +
  • -

#4 hackterr  Icon User is offline

  • D.I.C Regular

Reputation: 21
  • View blog
  • Posts: 293
  • Joined: 13-August 09

Re: my code

Posted 08 November 2009 - 02:13 AM

:code:
do not create multiple topics for a single question
You dont have to solve this problem using programming for one.
you can use some existing packages for this kind of work.
even MS office or openoffice can do this. They simply create a server where multiple users can see or edit a file.
U can even use MS access and its forms utility to automate entry into database and other stuff.Just Explore that option

But if you do wanna create a program for doing this job:

creating a file and manipulating it in excel is a lot of hard work and the excel format changes with every new release of ms excel
I would recommend that you create the database in a CSV format or comma separated format.
In this the program would save values like

employeeId, name , address, Dateofjoining,Employeeleave
123, aarti, 154 lalbagh, 12-03-208,01-03-2009---21-23-2009

ok?

your program would consist of two parts one that is the client and the server
Client:
this would reside on boss's pc
its function would be to access database in your PC and show it to your boss
Second part Server:
this would reside on your PC
its function will be to read your database and send it to your bosses PC when he opens the client on his pc and allow you to edit the database at your PC


**Multiple message due to topic merging**

This post has been edited by hackterr: 08 November 2009 - 02:17 AM

Was This Post Helpful? 0
  • +
  • -

#5 no2pencil  Icon User is offline

  • Professor Snuggly Pants
  • member icon

Reputation: 6560
  • View blog
  • Posts: 30,699
  • Joined: 10-May 07

Re: my code

Posted 08 November 2009 - 02:15 AM

** Topics Merged **
Was This Post Helpful? 0
  • +
  • -

#6 aarti118  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 08-November 09

Re: my code

Posted 09 November 2009 - 01:40 AM

hello !!!

i am struggling with mircrosoft access, my boss would surely want to know how old is the employee.......meaning he/she is working from how many years. for that i have entered hired date and todays date. can you please help me to set up a filter which would calculate the no. of years in between..........without humiliating me. please i am a secretary but i have to do this to save my job.
Was This Post Helpful? 0
  • +
  • -

#7 danny_kay1710  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 29
  • View blog
  • Posts: 359
  • Joined: 27-April 08

Re: my code

Posted 09 November 2009 - 02:09 AM

I would ask why you are trying to achieve this in C if your a secretary.

It would probably be much easier developing it in a higher level language. C# or another .NET based language or really all you would need is Access with some forms??

I don't really understand for the need for a program written in C.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1