| |

VerySource

 Forgot password?
 Register
Search
View: 1500|Reply: 10

Variable undefined problem! !! !! !!

[Copy link]

3

Threads

11

Posts

10.00

Credits

Newbie

Rank: 1

Credits
10.00

 China

Post time: 2020-3-18 14:00:01
| Show all posts |Read mode
When you start to make the interface, all the defined variables are fine, and the interface is still usable!
But after adding a program under one of the "buttons", it says that the variables above are "undeclared identifier",
Excuse me, why?
Reply

Use magic Report

0

Threads

5

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-6-26 15:00:01
| Show all posts
See if the variable definition is wrong, send the code to see.
Reply

Use magic Report

0

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-6-26 16:00:02
| Show all posts
To be more specific. . .
Reply

Use magic Report

1

Threads

6

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-7-4 09:00:01
| Show all posts
Is there code?
Reply

Use magic Report

0

Threads

70

Posts

42.00

Credits

Newbie

Rank: 1

Credits
42.00

 China

Post time: 2020-7-4 12:30:02
| Show all posts
Didn't add semicolon at the end?
Reply

Use magic Report

3

Threads

11

Posts

10.00

Credits

Newbie

Rank: 1

Credits
10.00

 China

 Author| Post time: 2020-7-8 18:00:01
| Show all posts
The code is too long, I post the problem:
CKir2dDlg::CKir2dDlg(CWnd* pParent /*=NULL*/)
: CDialog(CKir2dDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CKir2dDlg)
m_dxm = _T("");
m_angmax = _T("");
m_aperx = _T("");
m_doff = _T("");
m_ds = _T("");
m_dt = _T("");
m_dxo = _T("");
m_dzt = _T("");
m_fmax = _T("");
m_fs = _T("");
m_ft = _T("");
m_fxo = _T("");
.
.
.
.
It is the error C2065 that all the above variables say:'m_dxm': undeclared identifier
                        error C2440:'=': cannot convert from'char [1]' to'int'
All are similar to this wrong question!
Thank you!
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-7-9 01:15:01
| Show all posts
See if the variable type is wrong
Reply

Use magic Report

0

Threads

70

Posts

42.00

Credits

Newbie

Rank: 1

Credits
42.00

 China

Post time: 2020-7-9 14:30:01
| Show all posts
What type of variable is m_dxm
Reply

Use magic Report

3

Threads

11

Posts

10.00

Credits

Newbie

Rank: 1

Credits
10.00

 China

 Author| Post time: 2020-7-17 13:15:01
| Show all posts
It is of type "CString"!
The above variable is not used in the added program, and it is not involved at all. It is unclear why the prompt prompts that the variable is wrong?
Reply

Use magic Report

1

Threads

12

Posts

12.00

Credits

Newbie

Rank: 1

Credits
12.00

 China

Post time: 2020-7-18 19:45:01
| Show all posts
Are the variables in the header file missing?
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list