无法using System的问题
snfdf 2015-07-30 07:25:14 业余编程很多年,平常就是写个简单的程序自己用用,如果有描述不清楚的地方还请见谅哈.
前一阵用C++写了个DLL,碰到很多问题,其中就有using namespace std报错,后来好不容易解决了, 现在又无法using System.Speech.Synthesis;报错为:error C2873: “System”: 符号不能用在 using 声明中.不知道为啥,这个程序碰到的问题特别多,我把前面的几行代码帖一下高手帮我看一下,谢谢.
这是源文件
#include "stdafx.h"
using namespace std;
using System.Speech.Synthesis;
这是头文件
#pragma once
#include "targetver.h"
#define WIN32_LEAN_AND_MEAN // 从 Windows 头文件中排除极少使用的信息
// Windows 头文件:
#include <windows.h>
#include <algorithm>
#include <vector>
再其它的都是些普通代码,应该不会对这个有影响.还请高手帮忙,感谢.