Problems using std in MFC please help! 
Author Message
 Problems using std in MFC please help!

I am new to MFC but I know there is a bug that sometimes causes
problems when using namespace std. However I have a problem using Std
even at all.
If i write std::string or std::vector or anything,I get the following
error: "'std'  : is not a class or namespace name"
I get the same message if I try to put using namespace std in the
beginning of the file. It seems like it doesn't recognize the standard
library at all, is there any settings I have missed or anything else I
have missed.
Please Help!
/Gustaf (Frustrated student)

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Wed, 26 Jun 2002 03:00:00 GMT  
 Problems using std in MFC please help!
You must first #include some header that mentions the namespace. Make sure
you are not using the old headers (things like vector.h)

#include <vector>
using namespace std;                // this should work now

std::vector <int> vi;                        // so should this

NeilB

Quote:

> I am new to MFC but I know there is a bug that sometimes causes
> problems when using namespace std. However I have a problem using Std
> even at all.
> If i write std::string or std::vector or anything,I get the following
> error: "'std'  : is not a class or namespace name"
> I get the same message if I try to put using namespace std in the
> beginning of the file. It seems like it doesn't recognize the standard
> library at all, is there any settings I have missed or anything else I
> have missed.
> Please Help!
> /Gustaf (Frustrated student)

> Sent via Deja.com http://www.deja.com/
> Before you buy.



Wed, 26 Jun 2002 03:00:00 GMT  
 Problems using std in MFC please help!

It seems that you haven't included any file with this namespace, e.g.
<string> or <vector>.

Quote:

>I am new to MFC but I know there is a bug that sometimes causes
>problems when using namespace std. However I have a problem using Std
>even at all.
>If i write std::string or std::vector or anything,I get the following
>error: "'std'  : is not a class or namespace name"
>I get the same message if I try to put using namespace std in the
>beginning of the file. It seems like it doesn't recognize the standard
>library at all, is there any settings I have missed or anything else I
>have missed.
>Please Help!
>/Gustaf (Frustrated student)

>Sent via Deja.com http://www.deja.com/
>Before you buy.



Wed, 26 Jun 2002 03:00:00 GMT  
 Problems using std in MFC please help!
I think Vladimir's suggestion should help. If not, it'd be easier for us to
help if you could include a small example that reproduces the problem.

Donald Xie

Quote:

> I am new to MFC but I know there is a bug that sometimes causes
> problems when using namespace std. However I have a problem using Std
> even at all.
> If i write std::string or std::vector or anything,I get the following
> error: "'std'  : is not a class or namespace name"
> I get the same message if I try to put using namespace std in the
> beginning of the file. It seems like it doesn't recognize the standard
> library at all, is there any settings I have missed or anything else I
> have missed.
> Please Help!
> /Gustaf (Frustrated student)

> Sent via Deja.com http://www.deja.com/
> Before you buy.



Wed, 26 Jun 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. problem about std::ifstream!!!please help me!!!

2. Please help!!!!Please help!!!!Please help!!!!Please help!!!!Please help!!!!Please help!!!!Please help!!!!

3. Nt Service Using MFC : Please Help

4. NT Service Using MFC (Samples\sdk\winnt\service) PLEASE HELP

5. Building static LIB using MFC: Please Help!

6. Drawing graphic tiles with transparency using MFC, Need Help Please

7. Reading/Writing Bitmaps using MFC DAO - Please Help

8. export classes using std namespace (ex std::vector) in a DLL

9. Using custom CPrintDialog in std MFC

10. URGENT - Please Help Me - 80386 Vs MIL-STD-1750A

11. Please Help: problem creating and using a library

12. ODBC & MFC Problem - Please Help

 

 
Powered by phpBB® Forum Software