errors??? i am using visual studio when i am making of this header file .cpp file compiler generate error's given below

#include<stdlib.h>
#include <cstdlib> // Provides size_t
#ifndef MAIN_SAVITCH_SEQUENCE_H
#define MAIN_SAVITCH_SEQUENCE_H
//#include <cstdlib> // Provides size_t
//#include<stdlib.h>
//using namespace std;
namespace main_savitch_3
{
class sequence
{
public:
// TYPEDEFS and MEMBER CONSTANTS
typedef double value_type;
typedef std::size_t size_type ;
static const size_type CAPACITY=30 ;
// CONSTRUCTOR
sequence( );
// MODIFICATION MEMBER FUNCTIONS
void start( );
void advance( );
void insert(const value_type& entry);
void attach(const value_type& entry);
void remove_current( );
// CONSTANT MEMBER FUNCTIONS
size_type size( ) const;
bool is_item( ) const;
value_type current( ) const;


private:

value_type data[CAPACITY];
size_type used;
size_type current_index;
};
}
#endif

error C2653: 'std' : is not a class or namespace name
c:\users\riu\downloads\hina\hina\sequence.h(17) : error C2258: illegal pure syntax, must be '= 0'
c:\users\riu\downloads\hina\hina\sequence.h(17) : error C2252: 'CAPACITY' : pure specifier can only be specified for functions
c:\users\riu\downloads\hina\hina\sequence.h(34) : error C2065: 'CAPACITY' : undeclared identifier
c:\users\riu\downloads\hina\hina\sequence.h(34) : error C2057: expected constant expression
c:\users\riu\downloads\hina\hina\sequence.h(34) : warning C4200: nonstandard extension used : zero-sized array in struct/union
c:\users\riu\downloads\hina\hina\sequence.h(35) : error C2229: class 'main_savitch_3::sequence' has an illegal zero-sized array :(
Last edited on
Topic archived. No new replies allowed.