typedef int my_type;
const int ci = 10;
typedef double my_type;
const int ci = 20;
extern const int ci = 10;
extern const int ci;
#ifndef LIST_H
#define LIST_H
#include <iostream>
class list
{
public:
list();
~list();
list *remove();
void append(list *lp);
void insert(list *lp);
list *get_next() const { return next; }
list *get_prev() const { return prev; }
void print( std::ostream& os) const;
static int get_nid() { return nid; }
private:
const int id;
list *next;
list *prev;
static int nid;
list( const list &rhs);
list operator=( const list *rhs);
};
std::ostream& operator<<( std::ostream&, const list&);
#endif
#include <iostream>
#include "list.h"
using namespace std;
int list::nid = 0;
list::list() : id(nid), prev(0), next(0)
{
++nid;
}
class X
{
static const int c1 = 7;
static int i2 = 8;
const int c3 = 9;
static const int c4 = f(2);
static const float f = 3.14;
};
const int X::c1;