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

Managed C++/CLI

 
AnswerRe: porting in RHEL (UNIX) Pin
Paul Conrad20-Nov-08 5:56
professionalPaul Conrad20-Nov-08 5:56 
QuestionSave Socket^ variable in the global scope Pin
cra03418-Nov-08 2:14
cra03418-Nov-08 2:14 
AnswerRe: Save Socket^ variable in the global scope Pin
led mike18-Nov-08 5:00
led mike18-Nov-08 5:00 
QuestionChecking Latest Virus Scan? Pin
DarthKarnage17-Nov-08 5:51
DarthKarnage17-Nov-08 5:51 
AnswerCross Post Pin
led mike18-Nov-08 5:07
led mike18-Nov-08 5:07 
Question[Message Deleted] Pin
De@r17-Nov-08 3:49
De@r17-Nov-08 3:49 
AnswerRe: bubble sort to quick sort Pin
73Zeppelin17-Nov-08 6:15
73Zeppelin17-Nov-08 6:15 
QuestionSTL/CLR Pin
staticv17-Nov-08 1:31
staticv17-Nov-08 1:31 
Hi I cannot compile the following code

The error is
1>.\STL_CLR.cpp(3) : fatal error C1083: Cannot open include file: 'cliext/vector': No such file or directory



Here is my code
Person.h

#pragma once
using namespace System;

ref class Person
{
public:
	Person() : firstName(" "), secondName(" ") {}

	Person(String ^first, String^ second) : firstName(first), secondName(second) { }

	// Destructor
	~Person() { }

	virtual String^ ToString() override
	{
		return firstName + L" " + secondName;
	}

private:
	String^ firstName;
	String^ secondName;
};


STL_CLR.cpp
#include "Person.h"
#include "stdafx.h"
#include 

using namespace System;
using namespace cliext;

int main(array<string> ^args)
{
	vector<person^>^ people = gcnew vector<person^>();
	String^ first;
	String^ second;
	Person^ person;

	while (true)
	{
		Console::WriteLine(L"Enter a first name or press Enter to end: ");
		first = Console::ReadLine();
		if (first->Length == 0)
			break;
		Console::WriteLine(L"Enter a second name: ");
		second = Console::ReadLine();
		person = gcnew Person(first->Trim(), second->Trim());
		people->push_back(person);
	}

	// Output the vec
	Console::WriteLine(L"\nThe persons in the vector are:");
	for each(Person^ person in people)
		Console::WriteLine("{0}", person);
	return 0;
}
</string>

QuestionSyntax Error Help: Switch Statement Code Pin
Olaman15-Nov-08 18:09
Olaman15-Nov-08 18:09 
AnswerRe: Syntax Error Help: Switch Statement Code Pin
Mark Salsbery16-Nov-08 6:49
Mark Salsbery16-Nov-08 6:49 
QuestionPostMessage fails in Windows Service [modified] Pin
Indivara13-Nov-08 14:29
professionalIndivara13-Nov-08 14:29 
GeneralRe: PostMessage fails in Windows Service Pin
Mark Salsbery15-Nov-08 12:32
Mark Salsbery15-Nov-08 12:32 
GeneralRe: PostMessage fails in Windows Service Pin
Indivara16-Nov-08 14:28
professionalIndivara16-Nov-08 14:28 
GeneralRe: Solution Pin
Indivara18-Nov-08 18:04
professionalIndivara18-Nov-08 18:04 
AnswerRe: PostMessage fails in Windows Service Pin
Rob Graham21-Dec-08 4:19
Rob Graham21-Dec-08 4:19 
Questionbinding Many records to one textbox Pin
Member 294183412-Nov-08 13:24
Member 294183412-Nov-08 13:24 
AnswerRe: binding Many records to one textbox Pin
N a v a n e e t h12-Nov-08 17:31
N a v a n e e t h12-Nov-08 17:31 
QuestionSelf integrity check of my program Pin
stormydaniels7-Nov-08 15:40
stormydaniels7-Nov-08 15:40 
AnswerRe: Self integrity check of my program Pin
Mark Salsbery8-Nov-08 7:27
Mark Salsbery8-Nov-08 7:27 
QuestionMemory usage and dialogs Pin
dSolariuM1-Nov-08 21:06
dSolariuM1-Nov-08 21:06 
AnswerRe: Memory usage and dialogs Pin
Giorgi Dalakishvili2-Nov-08 4:27
mentorGiorgi Dalakishvili2-Nov-08 4:27 
AnswerRe: Memory usage and dialogs Pin
Mark Salsbery2-Nov-08 9:43
Mark Salsbery2-Nov-08 9:43 
AnswerRe: Memory usage and dialogs Pin
N a v a n e e t h2-Nov-08 17:32
N a v a n e e t h2-Nov-08 17:32 
AnswerRe: Memory usage and dialogs Pin
led mike5-Nov-08 4:22
led mike5-Nov-08 4:22 
QuestionQ: Changing Language with Thread::CurrenThread::CurrentUICulture Pin
jreisslein31-Oct-08 3:42
jreisslein31-Oct-08 3:42 

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.