Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1253
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

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