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

Managed C++/CLI

 
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 
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 
in the header file you need

vector<person> m_Staff;

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

void EmployeeDatabase::makePerson(string employeeName, int employeeID, double employeeShoeSize)
{//complete code.
Person p(employeeName, employeeID, employeeShoeSize); // this assumes a class called person with this constructor signature
m_Staff.push_back(p);
}

Now, for your search functions, do you want to do something like :

std::vector<person>::iterator it = m_Staff.begin();

for (; it != m_Staff.end(); ++it)
{
Person p = *it; // You dereference an iterator to get the object.
// Check if this person has the data you're looking for, and if so, return it.

}

// return some default value for item not found.

Christian Graus - Microsoft MVP - C++
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 
GeneralRe: operator &lt;&lt; is ambiguous? Pin
LiYS10-Sep-05 2:49
LiYS10-Sep-05 2:49 
GeneralRe: operator &lt;&lt; is ambiguous? Pin
mcnu10-Sep-05 6:10
mcnu10-Sep-05 6:10 
GeneralRe: operator &lt;&lt; is ambiguous? Pin
LiYS10-Sep-05 15:06
LiYS10-Sep-05 15:06 

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.