//---------ComOpre.h
class ComOpre
{
public:
HANDLE hd_com1,hd_com2; BOOL opencom(int port);
}//---------ComOpre.cpp
#include "stdafx.h"
#include "ComOpre.h"
BOOL ComOpre::opencom(int port)
{
return ;
}编译
--------------------Configuration: 008 - Win32 Debug--------------------
Compiling...
ComOpre.cpp
D:\XJ_Work_Station\test\1127\008\ComOpre.cpp(5) : error C2143: syntax error : missing ';' before 'tag::id'
D:\XJ_Work_Station\test\1127\008\ComOpre.cpp(5) : error C2377: 'BOOL' : redefinition; typedef cannot be overloaded with any other symbol
d:\program files\microsoft visual studio\vc98\include\windef.h(142) : see declaration of 'BOOL'
D:\XJ_Work_Station\test\1127\008\ComOpre.cpp(5) : fatal error C1004: unexpected end of file found
执行 cl.exe 时出错.
Creating browse info file...
BSCMAKE: error BK1506 : cannot open file '.\Debug\ComOpre.sbr': No such file or directory
执行 bscmake.exe 时出错.008.exe - 1 error(s), 0 warning(s)
class ComOpre
{
public:
HANDLE hd_com1,hd_com2; BOOL opencom(int port);
}//---------ComOpre.cpp
#include "stdafx.h"
#include "ComOpre.h"
BOOL ComOpre::opencom(int port)
{
return ;
}编译
--------------------Configuration: 008 - Win32 Debug--------------------
Compiling...
ComOpre.cpp
D:\XJ_Work_Station\test\1127\008\ComOpre.cpp(5) : error C2143: syntax error : missing ';' before 'tag::id'
D:\XJ_Work_Station\test\1127\008\ComOpre.cpp(5) : error C2377: 'BOOL' : redefinition; typedef cannot be overloaded with any other symbol
d:\program files\microsoft visual studio\vc98\include\windef.h(142) : see declaration of 'BOOL'
D:\XJ_Work_Station\test\1127\008\ComOpre.cpp(5) : fatal error C1004: unexpected end of file found
执行 cl.exe 时出错.
Creating browse info file...
BSCMAKE: error BK1506 : cannot open file '.\Debug\ComOpre.sbr': No such file or directory
执行 bscmake.exe 时出错.008.exe - 1 error(s), 0 warning(s)
解决方案 »
- 关于树形控件成员函数声明问题
- 一定得使用动态内存吗?动态内存的作用?
- 学习Windows Media Format SDK中的问题,有经验的高手请帮帮忙!
- 大虾高分救命阿!!!如何得到属性页的内容
- 怎么样得到显卡的信d息,如类型,显存?
- 如何使用循环(例如:数组)实现对多个串口初始化?
- 除了使用CreateProcess返回PROCESS_INFORMATION型进程信息,还可以用其它方法得到它吗?
- 刚朝一个空的数据库写入内容,怎么得到它的长度呢??……里面有我的原代码,我的分不多了,但我希望高手能帮我一把!!
- gdi+中drawstring的参数怎么改。。。?
- 请问宏定义中的以下符号是什么意思
- 谁有详细点的mfc类别组织框架图
- 如何实现按文件名排序的方式来遍历一个目录??
{
public:
HANDLE hd_com1,hd_com2; BOOL opencom(int port);
}; //加分号
{
public:
HANDLE hd_com1,hd_com2; BOOL opencom(int port);
}---->这地方加一个冒号
BOOL ComOpre::opencom(int port)
{
return ; ----->明明是返回一个BOOL值,你却不返回值
}重新编译一次看看...
{
public:
HANDLE hd_com1,hd_com2; BOOL opencom(int port);
}---->这地方加一个分号
#ifndef _xxx
#define xxx
#include "xxx.h"
#endif