Creating Meshes and map X-Y-Z coords for objects.

How do i make Meshes and make a map-system that uses something like this:

enum objtype{NONE=0,BOX=1,PLAYER='P'}

void CreateObject(float x, float y, float y, int type)
{
}