• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1224
  • Last Modified:

CRegKey class.

Hi,

I wrote a MFC program, and I tried to use the CRegKey class.
The file "AtlBase.h" is included in stdafx.h.

The problem is that I got the following two errors :

"error C2872: 'CRegKey' : ambiguous symbol"
"error C2079: 'RegKey' uses undefined class 'CRegKey'"

My question is, What can I do to fix these errors ?

Thanks
Michael.
0
MichaelMaromm
Asked:
MichaelMaromm
1 Solution
 
migelCommented:
Hi!
Did you try adding namespace prefix before using CRegKey?
that is
ATL::CRegKey RegKey;
 
also try add #include <atlbase.h> into the your project stdafx.h
0
 
MichaelMarommAuthor Commented:
Hi migel , I'm sorry, that it took a lot of time, but thanks for your answer, I give you your 50 points.

Michael.
0

Featured Post

Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now