| |

VerySource

 Forgot password?
 Register
Search
View: 896|Reply: 3

is not a class or namespace name! it's wired

[Copy link]

2

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-3-5 15:30:01
| Show all posts |Read mode
#if! defined (AFX_PRINTER_H)
#define AFX_PRINTER_H

#if _MSC_VER> = 1000
#pragma once
#endif // _MSC_VER> = 1000

#include "resource.h" // main symbols
#include "StdAfx.h"

class CPrinter {
public:
CPrinter ();
virtual ~ CPrinter ();
public:
HDC GetPrintHandle ();
BOOL IsCurrentPrinter ();
void EnumPrinter (CList <CString, CString> * lstKeyName);
void PrintSickTR (LPCTSTR lpszHospitalName, HDC hDCPrinter);

private:
int m_nPaperWidth;
int m_nPaperHeight;
CRect m_rectPaper;
};
#endif

The error message in .cpp is:
error C2653: 'CPrinter': is not a class or namespace name
Reply

Use magic Report

0

Threads

59

Posts

43.00

Credits

Newbie

Rank: 1

Credits
43.00

 China

Post time: 2020-5-20 19:30:02
| Show all posts
Comment out these macros
#if! defined (AFX_PRINTER_H)
#define AFX_PRINTER_H
Reply

Use magic Report

1

Threads

5

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-5-24 09:30:01
| Show all posts
Didn't include the header file?
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-9-6 20:15:01
| Show all posts
#include "resource.h "// main symbols
#include "StdAfx.h "
Swap next order
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