J
Jon
Whether I can compile a class or not, depends on the order of functions in my class.
My question is (see example below):
1) Is it a bug that the class 'WillCompile' will compile and execute, or
2) or is it a bug that the class 'WillNotCompile' will not compile?.
#include "stdafx.h"
#include <iostream>
#include <memory>
using namespace std;
#using <mscorlib.dll>
using namespace System;
#pragma unmanaged
class WillCompile {
public:
static void Umg() {
}
#pragma managed
static void Mng( String* str ) {
Console::WriteLine( str );
}
};
#pragma unmanaged
class WillNotCompile {
public:
#pragma managed
static void Mng( String* str ) {
Console::WriteLine( str );
}
#pragma unmanaged
static void Umg() {
}
};
#pragma managed
int _tmain()
{
WillCompile::Mng( S"This works." );
Console::WriteLine(S"Press Enter to continue.");
Console::ReadLine();
return 0;
}
My question is (see example below):
1) Is it a bug that the class 'WillCompile' will compile and execute, or
2) or is it a bug that the class 'WillNotCompile' will not compile?.
#include "stdafx.h"
#include <iostream>
#include <memory>
using namespace std;
#using <mscorlib.dll>
using namespace System;
#pragma unmanaged
class WillCompile {
public:
static void Umg() {
}
#pragma managed
static void Mng( String* str ) {
Console::WriteLine( str );
}
};
#pragma unmanaged
class WillNotCompile {
public:
#pragma managed
static void Mng( String* str ) {
Console::WriteLine( str );
}
#pragma unmanaged
static void Umg() {
}
};
#pragma managed
int _tmain()
{
WillCompile::Mng( S"This works." );
Console::WriteLine(S"Press Enter to continue.");
Console::ReadLine();
return 0;
}