Image

Imagecgs3408h4x wrote in Imagecpp 😤working

Listens: Tim McGraw- That's Why God Made Mexico

I have been scratching my head at this all day

I cannot seem to figure out what's wrong with this class declaration.


#define MAXWORDS 30011
#include 
#include 


#ifndef _HASTTABLE_H
#define _HASHTABLE_H

class hashtable
{
public:
	hashtable();		// Default constructor
	class hashtable_item	
	{
	public:
		int scan_order;	        // Scanned in order
		int count;		// Occurnces
27:		string keyword;		// The actual string
	};
	hashtable_item table [MAXWORDS]; // An array of hashtable_items
	int size;		

32:	int f (const string&);	    // Hashing function
33:	void insert (const string&);// Inserts string into the hashtable_item
};

#endif


And I get the following errors:
------ Build started: Project: project2, Configuration: Debug Win32 ------

Compiling...
hashtable.cpp
hashtable.h(27) : error C2146: syntax error : missing ';' before identifier 'keyword'
hashtable.h(27) : error C2501: 'hashtable::hashtable_item::string' : missing storage-class or type specifiers
hashtable.h(27) : error C2501: 'hashtable::hashtable_item::keyword' : missing storage-class or type specifiers
hashtable.h(32) : error C2143: syntax error : missing ',' before '&'
hashtable.h(33) : error C2143: syntax error : missing ',' before '&'

---------------------- Done ----------------------

    Build: 0 succeeded, 1 failed, 0 skipped