- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: aCC error
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2007 08:48 PM
04-08-2007 08:48 PM
I am using aCC to compile a C++ code.
aCC version - aCC: HP ANSI C++ B3910B A.03.70
in HP UX 11i
I have a class which contains a function as below.
class ActivitiesFilters {
BaseError addUserFilters(string& lotnumber, string& wafernumb
er, string& chip);
};
Where BaseError is the class depending on which error conditions are checked.
Now, I am calling the function from the Cpp file. As below
BaseError statusR;
statusR = addUserFilters(string("*"), string("*"), string("*"));
The compiler says
Error 438: "src/activities_filters.cpp", line 608 # The initializer for a
non-constant reference must be an lvalue. Try changing
'basic_string
basic_string
["./inc/activities_filters.h", line 563].
statusR = addUserFilters(string("*"), string("*"), string("*"));
Can anybody suggest me any solution for this error because the same code is working fine in windows .net and vc++ compilers.
thanks in advance
Vikram
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2007 09:21 PM - edited 10-07-2011 02:06 AM
04-08-2007 09:21 PM - edited 10-07-2011 02:06 AM
Re: aCC error
>Can anybody suggest me any solution for this error because the same code is working fine in windows .net and vc++ compilers.
I can't see how, this code is illegal.
As the proto says, this takes a reference to a string.
BaseError addUserFilters(string&, string&, string&);
But the temp result of a string constructor isn't a lvalue. As the error message says, you must change these to const&. Or you must create a temp for your string("*").
- Tags:
- Reference
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2007 01:17 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2007 04:26 PM
04-09-2007 04:26 PM
Re: aCC error
Thats right there is +p flag in the Makefile under CXXFLAGS. I removed that flag and compiled the code is compiling fine with warnings.
thank you very much
Vikram
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2007 04:44 PM
04-09-2007 04:44 PM
Re: aCC error
http://forums1.itrc.hp.com/service/forums/helptips.do?#33