类和结构 [英] Classes and structures

查看:77
本文介绍了类和结构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个结构化的代码片段,我正在转换为面向对象,结构化代码包含一个stuct;


I have a structured piece of code that i am converting into object orientated, the structured code contains a stuct;


展开 | 选择 | Wrap | 行号

推荐答案

鉴于您发布的信息量有限,我会说您在头文件中定义了OpAmpDb :: OpAmpDb()的主体。我可能错了。但是有机会我是正确的,但是源文件中的函数定义。


如果我错了,如果你发布从comipler发出的错误消息可能会有所帮助。


Adrian
Given the limited amount of information you have posted, I would say that you are defining the body of OpAmpDb::OpAmpDb() in the header file. I could be wrong though. But in the off chance I am correct, but the function definition in a source file.

If I am wrong, it may help if you post the error messages being emitted from the comipler.


Adrian


我有2个头文件和一个cpp文件。


object.h包含;

I have 2 header files and one cpp file.

object.h contains;

展开 | 选择 | Wrap | 行号


展开 | 选择 | Wrap | 行号


这篇关于类和结构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆