#ifndef LIST_H
#define LIST_H
#include <iostream>

typedef char Item;
class List{
	
public:
	
	List()
	{first = NULL; last = NULL;}
	
	//~List()

	void append(Item entry);
	void remove_last();
	void output();

	
private:
	
	struct Node
	{
		Item data;
		Node *next;
		Node *back;
	};
	Node *first;
	Node *last;
};
#endif

I'm writing a class file to store a doubly linked list. This file will not compile on unix. can anyone find any problem with it?

error message here:

csci>g++ -c list.h
quota_ufs: over hard disk limit (pid 20807, uid 202938, inum 1115162, fs /export/home)
list.h:33: fatal error: can't write PCH file: Disc quota exceeded
compilation terminated.
csci>

I think the fatal error says everything

Disc quota exceeded

I think it is time to talk very nicely to the system admin. or delete that large cache of movies.... ;)

I think the fatal error says everything

Disc quota exceeded

I think it is time to talk very nicely to the system admin. or delete that large cache of movies.... ;)

my other files compiled nicely though.

Generally speaking, it's an absolutely senseless operation to compile header file with a single class definition. No correspondend code (object module) generated. May be the compiler go off its head while performing such an action ;),,,

Generally speaking, it's an absolutely senseless operation to compile header file with a single class definition. No correspondend code (object module) generated. May be the compiler go off its head while performing such an action ;),,,

it does the same thing when i compile all 3 files.

g++ list.h list.cpp program4.cpp

list.cpp = implementation file
program4.cpp = client program

You do not have enough disk space to save the pre-compiled headers (PCH file). Delete some files and try again. It is beside the point that your other files compiled nicely. This problem has nothing to do with your code.

You do not have enough disk space to save the pre-compiled headers (PCH file). Delete some files and try again. It is beside the point that your other files compiled nicely. This problem has nothing to do with your code.

hm..., i'll email my professor.

Member Avatar for Syed Zuman

Remove

include <iostream>

and it will run.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.