#include <iostream>
#include <string>
#include <vector>
enum Error_Code
{
success,
not_present,
overflow,
underflow,
duplicate_error
};//class Vertex definition
class Vertex
{
public:
Vertex():x(0), y(0)
{} Vertex(const string &name, int cx = 0, int cy = 0):m_szName(name), x(cx), y(cy)
{} string m_szName; //Vertex's name
int    x; //Vertex's coordinate
int    y;
};
报错为:
e:\mydocument\c\datastruct\graph\graph.h(24) : error C2629: unexpected 'class Vertex ('
e:\mydocument\c\datastruct\graph\graph.h(24) : error C2334: unexpected token(s) preceding ':'; skipping apparent function body
e:\mydocument\c\datastruct\graph\graph.h(26) : error C2146: syntax error : missing ';' before identifier 'm_szName'
e:\mydocument\c\datastruct\graph\graph.h(26) : error C2501: 'string' : missing storage-class or type specifiers
e:\mydocument\c\datastruct\graph\graph.h(26) : error C2501: 'm_szName' : missing storage-class or type specifiers