Отдельно всё работает. А если это этот же код подключаю к проекту на C# то вот какие ошибки:
| Цитата | Error 1 error C3222: 'x' : cannot declare default arguments for member functions of a managed type or generic functions c:\documents and settings\melethron\мои документы\visual studio 2005\projects\graph\graph\Graph.h 34 Error 2 error C3222: 'y' : cannot declare default arguments for member functions of a managed type or generic functions c:\documents and settings\melethron\мои документы\visual studio 2005\projects\graph\graph\Graph.h 34 Error 3 error C2065: 'NULL' : undeclared identifier c:\Documents and Settings\Melethron\Мои документы\Visual Studio 2005\Projects\Graph\Graph\Graph.cpp 12
|
| Код | // This is the main DLL file.
#include "stdafx.h"
#include "Graph.h"
using namespace GraphSpace;
Graph::Graph() { graph = new Peak; graph->next = NULL; graph->numer = 0; graph->x = 0; graph->y = 0; graph->ribs = NULL; EnableLoops = false; EnableRepeat = false; }
|
| Код | // Graph.h
#pragma once
using namespace System;
namespace GraphSpace { struct Rib; struct Peak { int numer; int x; int y; Peak * next; Rib * ribs; }; struct Rib { Peak * toPeak; Rib * next; }; public ref class Graph { private: Peak * graph; public: bool EnableLoops; bool EnableRepeat; public: Graph(); //Graph(const Graph & copy); ~Graph(); void print(); bool AddPeak(int x = 0, int y = 0); bool DeletePeak(int the); bool RenumerPeak(int the, int to); bool MovePeak(int the, int x, int y); bool AddRib(int from, int to); bool AddDoubleRib(int the1, int the2); bool DeleteRib(int from, int to); bool DeleteDoubleRib(int the1, int the2); private: Peak * GetPeak(int the); Peak * EnablePeak(); int EnableNumer(); }; }
|
В чём проблема может быть? |