20080913

map

转胡艳梅的问题,改了一下代码

#include <map>
using namespace std;

map<char,int> m;
m;
    int main()

     {
    m['C'] = 1;
    m['G'] = 2;
    m['T'] = 3;
    m['-'] = 4;

     }
编译错:
huym.cpp:6: error: expected constructor, destructor, or type conversion before ';' token
-----------
说明m作为全局变量,但在编译期间不能引用;在main函数中就是运行时引用了。
原因不明。

杨贵福

1 comment:

Anonymous said...

Thanks to my father who informed me concerning this blog,
this blog is actually awesome.

my page; cellulite treatment reviews