C++ MFC

Make sure:

#include "stdafx.h"

comes FIRST otherwise you will get lots of proper errors.

If you see the following error:

error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup

Make sure that your linker is set to compile for windows:

Project > Properties > Linker > System > SubSystem
set to
Windows (/SUBSYSTEM:WINDOWS)

Another key hint is to set your

Project > Properties > Configuration Properties > General > Use of MFC

set to:

Use MFC in a Shared DLL

some more MDX

Some fairly basic MDX stuff:

WITH
SET [a] AS [Geography].[City].[City] * [Product].[Category].Levels(1).Members 
SET [b] AS [Date].[Calendar].Levels(1).Members * [Sales Territory].[Sales Territory].[Country]
SELECT
     Order([a], [b].Item(0), BDESC ) ON ROWS
     ,[b]  ON COLUMNS
FROM [Adventure Works];

Use the * (asterisk) to separate multiple columns and rows. It’s a bit like a similar use in R when plotting against two things, I think the library(doBy) uses the same .

…with selection and NON EMPTY:

WITH
SET [a] AS	[Geography].[Country].&[Germany]
			*[Product].[Category].Levels(1).Members 
SET [b] AS	[Date].[Calendar].Levels(1).Members
			* [Sales Territory].[Sales Territory].[Country]
SELECT
     Order([a], [b].Item(0), BDESC ) ON ROWS
     ,non empty{[b]}  ON COLUMNS--[Geography].[City].&[Abingdon]&[ENG]
FROM [Adventure Works];