未声明的标识符错误#C2065 [英] Undeclared Identifier error #C2065

查看:98
本文介绍了未声明的标识符错误#C2065的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试构建一个具有多个函数和标识符的类。有问题的标识符是静态双AIR,它将保存班级中年利率的值。


我收到的错误信息似乎无法获得摆脱:


错误C2065:''AIR''未声明的标识符


我之前从未使用过静态标识符,我想我我在某个地方留下了什么,但我不知道是什么。


这里是标题和.cpp文件:


有什么想法吗?

I am trying to construct a class with several functions and identifiers. The identifier in question is static double AIR which will hold the value of the annual interest rate in the class.

I have been getting an error message that I can''t seem to get rid of:

error C2065: ''AIR'' undeclared identifier

I have never worked with static identifiers before and I think I''m leaving something out somewhere but I don''t know what.

Here''s the header and .cpp files:

Any Ideas?

展开 | 选择 | Wrap | 行号

推荐答案

是AIR的储蓄成员(或savingsAccount或其他)
is AIR a member of savings (or savingsAccount or whatever)


是的,它是。


如果它是私人的,就不能公开访问?

我不是这样的,但我不认为这是'可见它已被宣布的方式.....许多更好的大脑会在这里纠正我,我肯定
If it''s private, it can''t be accessed publicly?
I''m not sur eabout this, but I don''t think it''s visible the way that it has been declared.....And many better brains will correct me here, I''m sure


这篇关于未声明的标识符错误#C2065的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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