Click here to Skip to main content
15,919,479 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
QuestionThree Ques Pin
LiYS12-Sep-05 5:57
LiYS12-Sep-05 5:57 
AnswerRe: Three Ques Pin
Christian Graus12-Sep-05 12:36
protectorChristian Graus12-Sep-05 12:36 
GeneralRe: Three Ques Pin
LiYS12-Sep-05 15:13
LiYS12-Sep-05 15:13 
GeneralRe: Three Ques Pin
Christian Graus12-Sep-05 17:48
protectorChristian Graus12-Sep-05 17:48 
Questionheader error Pin
rolati12-Sep-05 4:08
rolati12-Sep-05 4:08 
QuestionHelp me!!!!! Detecting change in data streams Pin
bulgaa12-Sep-05 3:02
bulgaa12-Sep-05 3:02 
QuestionInsert data problem Pin
mengyin11-Sep-05 22:19
mengyin11-Sep-05 22:19 
Questionclasses c++ project HELP!! PLZ Pin
da_comp_learner11-Sep-05 15:19
da_comp_learner11-Sep-05 15:19 
I'm having trouble trying to do one on the implementation files of my project. can you plz help... i will attach the appropriate header file/s and .cpp files which I have completed, yet however that is one .cpp which is partially completed, can you really help with the definition of the member functions. The partially completed file is called EmployeeDatabase_template.cpp. i included the source code below for you to look at. plz help with definition of these member functions

<pre>
#include "EmployeeDatabase.h"
#include <vector>

using namespace std;

EmployeeDatabase::EmployeeDatabase()
{ // Complete code.
size = 0;

}

void EmployeeDatabase::getEids(vector <int>&ids)
{ // Complete code.

}


string EmployeeDatabase::getName(int employeeID)
{// Complete code.

}

double EmployeeDatabase::getShoeSize(int employeeID)
{// Complete code.

}

void EmployeeDatabase::makePerson(string employeeName, int employeeID, double employeeShoeSize)
{//complete code.

}

int EmployeeDatabase::getSize()
{// Complete code.

return size;
}

</pre>

here is the appropriate specification files(header files).
this is EmployeeDatabase.h

<pre>
// A EmployeeDatabase consists of a vector of Persons;
// methods are supplied to retrieve all the employee IDs and
// to query the database for employee names and shoesizes using
// the corresponding employee id.
#include "Person.h"
#include <vector>

using namespace std;

#ifndef EmployeeDatabase_H
#define EmployeeDatabase_H

class EmployeeDatabase{

public:

EmployeeDatabase();
// Constructor:
// Makes an instance of an EmployeeDatabase containing no data.

void getEids(vector <int>& ids);
// Returns a vector of all the employee ids in the vector people.

string getName(int employeeID);
// Returns the name of the Person with eid equal to employeeID.

double getShoeSize(int employeeID);
// Returns the shoesize of the Person with eid equal to employeeID.

void makePerson(string employeeName, int employeeID, double employeeShoeSize);
// Creates a new instance of Person using the input data
// and adds it to the vector people.

int getSize();
// Returns the number of Persons stored.


private:

// The database is vector of Persons.
vector <Person> people;
int size; // The number of Persons in the database.
};
#endif //EmployeeDatabase_H

</pre>

This is Person.h
<pre>
// A Person consists of the name, the employee ID and the shoe size.
// Methods are supplied to retrieve each of the three data items.

using namespace std;

#include<string>
#ifndef Person_H
#define Person_H

class Person{

public:

Person(); // Default constructor.

Person(string personName, int personId, double personShoeSize);
// Constructor:
// Makes an instance of a person with the
// given data.

string getName();
// Returns the name of the Person.

int getEid();
// Returns the employer ID of the Person.

double getShoeSize();
// Returns the shoesize of the Person.


private:
string name; // The employee's name.
int eid; // The employee's ID.
double shoeSize; // The employee's shoesize.
};
#endif
</pre>

PLZ CAN YOU HELP ME WITH THE FIRST BIT OF CODE THE OTHER TWO ARE THE HEADER FILES. I JUST CANT FIGURE OUT HOW TO DEFINE SOME OF THE MEMBER FUNCTIONS.


AnswerRe: classes c++ project HELP!! PLZ Pin
Christian Graus11-Sep-05 15:33
protectorChristian Graus11-Sep-05 15:33 
GeneralRe: classes c++ project HELP!! PLZ Pin
da_comp_learner11-Sep-05 15:41
da_comp_learner11-Sep-05 15:41 
GeneralRe: classes c++ project HELP!! PLZ Pin
Christian Graus11-Sep-05 15:55
protectorChristian Graus11-Sep-05 15:55 
QuestionHelp with DJGPP! (GCC for DOS) Pin
Lord Kixdemp11-Sep-05 7:06
Lord Kixdemp11-Sep-05 7:06 
QuestionRe: Help with DJGPP! (GCC for DOS) Pin
Lord Kixdemp11-Sep-05 11:47
Lord Kixdemp11-Sep-05 11:47 
QuestionMonitor Traffic on Single Computer... Pin
code-frog10-Sep-05 15:24
professionalcode-frog10-Sep-05 15:24 
Questionwhy it is giving runtime error? Pin
mcnu10-Sep-05 7:06
mcnu10-Sep-05 7:06 
AnswerRe: why it is giving runtime error? Pin
Christian Graus11-Sep-05 12:33
protectorChristian Graus11-Sep-05 12:33 
GeneralRe: why it is giving runtime error? Pin
mcnu11-Sep-05 15:45
mcnu11-Sep-05 15:45 
GeneralRe: why it is giving runtime error? Pin
Christian Graus11-Sep-05 15:56
protectorChristian Graus11-Sep-05 15:56 
GeneralRe: why it is giving runtime error? Pin
mcnu11-Sep-05 16:13
mcnu11-Sep-05 16:13 
GeneralRe: why it is giving runtime error? Pin
Christian Graus11-Sep-05 16:20
protectorChristian Graus11-Sep-05 16:20 
GeneralRe: why it is giving runtime error? Pin
mcnu11-Sep-05 16:50
mcnu11-Sep-05 16:50 
GeneralRe: why it is giving runtime error? Pin
Christian Graus11-Sep-05 16:51
protectorChristian Graus11-Sep-05 16:51 
GeneralRe: why it is giving runtime error? Pin
Nemanja Trifunovic12-Sep-05 2:35
Nemanja Trifunovic12-Sep-05 2:35 
Questionoperator &lt;&lt; is ambiguous? Pin
LiYS9-Sep-05 18:24
LiYS9-Sep-05 18:24 
AnswerRe: operator &lt;&lt; is ambiguous? Pin
mcnu10-Sep-05 2:00
mcnu10-Sep-05 2:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.