Click here to Skip to main content
16,004,927 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: capturing screen image, but count triangles and... help pls Pin
Christian Graus22-Apr-07 12:10
protectorChristian Graus22-Apr-07 12:10 
QuestionAn unhandled exception of type 'System.ArgumentException' [modified] Pin
j_blunt21-Apr-07 0:10
j_blunt21-Apr-07 0:10 
AnswerRe: An unhandled exception of type 'System.ArgumentException' Pin
George L. Jackson21-Apr-07 2:46
George L. Jackson21-Apr-07 2:46 
QuestionRegarding Copy Constructor: Pin
burrashiva20-Apr-07 18:29
burrashiva20-Apr-07 18:29 
AnswerRe: Regarding Copy Constructor: Pin
Christian Graus21-Apr-07 0:45
protectorChristian Graus21-Apr-07 0:45 
QuestionListViewColumnSorter doesn't seem to exist Pin
BuckBrown20-Apr-07 9:09
BuckBrown20-Apr-07 9:09 
AnswerRe: ListViewColumnSorter doesn't seem to exist Pin
BuckBrown20-Apr-07 9:30
BuckBrown20-Apr-07 9:30 
Questionerror C2440: 'initializing' : cannot convert from 'Box ^' to 'cli::array ^' Pin
BuckBrown19-Apr-07 9:57
BuckBrown19-Apr-07 9:57 
I am using Visual Studio 2005 C++/CLI. I am new to CLI and I am using Ivor Horton's book "Beginning Visual C++ 2005". Following the example in the book I get the error in this message's title. I'm thinking that the compiler may not be configured correctly. This is pretty straight forward. Does anyone see what is causing this problem.

-------------------
// Container.h
#pragma once
using namespace System;

ref class Container abstract
{
public:
virtual double Volume() abstract;
virtual void ShowVolume() { Console::WriteLine(L"Volume is {0}", Volume()); }
};

-------------------
// Box.h
#pragma once
#include "Container.h"

ref class Box : Container
{
public:
virtual void ShowVolume() override { Console::WriteLine(L"Box usable volume is {0}", Volume()); }
virtual double Volume() override { return m_Length * m_Width * m_Height; }

Box() : m_Length(1.0), m_Width(1.0), m_Height(1.0) {}
Box(double lv, double wv, double hv) : m_Length(lv), m_Width(wv), m_Height(hv) {}

protected:
double m_Length;
double m_Width;
double m_Height;
};

---------------------------------
// Ex9_14.cpp : main project file.
#include "stdafx.h"
#include "Box.h"

using namespace System;

int main(array<system::string ^=""> ^args)
{
array<box^>^ boxes = gcnew Box(); // without this line the app builds just fine

Console::WriteLine(L"Hello World");
return 0;
}

Thanks in advance.


Buck
QuestionRe: error C2440: 'initializing' : cannot convert from 'Box ^' to 'cli::array ^' [modified] Pin
Mark Salsbery19-Apr-07 10:09
Mark Salsbery19-Apr-07 10:09 
AnswerRe: error C2440: 'initializing' : cannot convert from 'Box ^' to 'cli::array ^' Pin
BuckBrown19-Apr-07 10:43
BuckBrown19-Apr-07 10:43 
GeneralRe: error C2440: 'initializing' : cannot convert from 'Box ^' to 'cli::array ^' Pin
Mark Salsbery19-Apr-07 10:54
Mark Salsbery19-Apr-07 10:54 
AnswerRe: error C2440: 'initializing' : cannot convert from 'Box ^' to 'cli::array ^' Pin
BuckBrown19-Apr-07 10:55
BuckBrown19-Apr-07 10:55 
QuestionProblem With ActiveX Control Pin
Adeel68819-Apr-07 2:32
Adeel68819-Apr-07 2:32 
AnswerRe: Problem With ActiveX Control Pin
Christian Graus21-Apr-07 0:46
protectorChristian Graus21-Apr-07 0:46 
QuestionCan you obtain the index in a 'for each' loop Pin
BuckBrown18-Apr-07 7:39
BuckBrown18-Apr-07 7:39 
AnswerRe: Can you obtain the index in a 'for each' loop Pin
George L. Jackson18-Apr-07 11:03
George L. Jackson18-Apr-07 11:03 
AnswerRe: Can you obtain the index in a 'for each' loop Pin
Christian Graus18-Apr-07 11:55
protectorChristian Graus18-Apr-07 11:55 
GeneralRe: Can you obtain the index in a 'for each' loop Pin
Mark Salsbery18-Apr-07 12:25
Mark Salsbery18-Apr-07 12:25 
QuestionlistView column header wont center justify Pin
BuckBrown18-Apr-07 6:19
BuckBrown18-Apr-07 6:19 
AnswerRe: using map container Pin
led mike18-Apr-07 4:45
led mike18-Apr-07 4:45 
Questionhelp with arrays [modified] Pin
klutez12318-Apr-07 3:12
klutez12318-Apr-07 3:12 
AnswerRe: help with arrays Pin
PhillArx18-Apr-07 3:40
PhillArx18-Apr-07 3:40 
QuestionMaking sure answer is correct Data Type Pin
Lasoryth17-Apr-07 10:53
Lasoryth17-Apr-07 10:53 
AnswerRe: Making sure answer is correct Data Type Pin
Christian Graus17-Apr-07 13:12
protectorChristian Graus17-Apr-07 13:12 
QuestionAccessing filesystem Pin
sinosoidal17-Apr-07 3:58
sinosoidal17-Apr-07 3:58 

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.