Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

String.h not allowed?



Try this:

1) Start a new C++ tool project

2) Add a header file called String.h to the project

3) #include <string> in String.h

4) #include "String.h" in main.cpp

5) try to compile

When I do this, the compiler barfs, with all sorts of messages about undeclared
symbols such as strcpy, memset, etc.

Next, add a header file called MyString.h, #include <string> in MyString.h, and #include
MyString.h in main.cpp; delete String.h from the project.

Now it will compile just fine.

So, my question is, what is up with the header file named String.h? Why can't I include such a
file in my project?

Seems strange, and unwieldy. And I wasted a day trying to figure this one out.

Any suggestions?

- David Chako
_______________________________________________
projectbuilder-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/projectbuilder-users
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.