Re: std::vector<> error.



kagdizuber@xxxxxxxxx wrote:
I am new to Solaris. I have written a progrm using std::vector which
gives me an compile error.
The program is given below:

//file: test.cpp
#include<vector>
int main()
{
typedef std::vector<bool> data;

typedef data::iterator iterator;
typedef data::const_iterator const_iterator;
typedef typename data::pointer pointer;
typedef typename data::const_pointer const_pointer;
return 0;
}

When i compile the above file using

CC test.cpp

it gives me error

"test.cpp", line 8: Error: std::vector<bool>::pointer is not accessible
from main().
"test.cpp", line 9: Error: std::vector<bool>::const_pointer is not
accessible from main().

Am I doing something wrong ?

Thanks in advance.

Zuber


I'd say this is a bug. You can work around it by using "CC
-library=stlport4" to compile your program. If you have a support
contract, I'd suggest that you file a bug report.

Cheers,
Tom
.



Relevant Pages

  • Re: SP and C# problem
    ... but I have noticed why you get the compile error. ... The value property is of type object - just typecast it to an int like so: ... > @RCOUNT INT OUTPUT ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Crash for Armidillo
    ... >> medical software where lives are at stake, and I get a compile error, ... A compile error is akin to ... > your version control system that doesn't compile. ... If you don't have a good collection of data on what parts of a design are ...
    (sci.space.policy)
  • Re: Unable to match function definition to an existing declaration
    ... > using namespace std; ... > int main ... and it can't compile it either. ... to submit a bug report for that, ...
    (microsoft.public.vc.language)
  • Re: why does adding 2 bytes together result in an int?
    ... |>> does the following code get a compile error? ... |>> I need to convert ttl into an int? ... |> arguments could be applied to int or long. ... produces -> error: CS0220 at compile time ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: anti-standard code can compile -- about template class
    ... in main, there will not be compile error, but if we invoke ... reference to class template instantiation 'Derived' being ... Base (int _i): i ...
    (microsoft.public.vc.language)