By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,655 Members | 1,005 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,655 IT Pros & Developers. It's quick & easy.

AIX xlC compiler v8.0 auto_ptr

P: 9
I am migrating to an AIX platform and I have the following sample code.

#include <stdio.h>
#include <string>
#include <memory>
int main() {
auto_ptr<String> pl = new String;
pl->assign((char *)"Hello World");
printf("%s\n",(char *)pl->c_str());

I tried compiling using the following:
xlC -o hello hello.cpp

I get the following error message
"hello.cpp", line 5.30: 1540-0130 (S) "String" is not declared.

This code works on the hp platform.

Can somone please let me know if I have to write my own string object for this platform?

Mar 8 '07 #1
Share this Question
Share on Google+
2 Replies

P: 1,646
Hi. What happens if you replace String with string?
Mar 9 '07 #2

P: 9
I get the same message except that it says "string" instead of "String".
I opened a ticket with IBM and they are looking into it. I will add that information here after it is resolved.

Mar 9 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.