By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,190 Members | 1,063 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,190 IT Pros & Developers. It's quick & easy.

error missing ; but can't find where

P: 7
I'm new to c++ and am getting a syntax error: missing ; before }
Any help would be greatly appreciated!

This is the code - where am I missing the ; ?

#ifndef H_addressType
#define H_addressType

#include<string>
#include<fstream>
using namespace std;

class addressType
{
public:
void print(ostream& fout) const;
//function to output the address
void setNumberOfAddresses(int validNumber);
//function to get number of addresses
//postcondition: number as a integer
void setAddress(string theStreet,string theCity,string theState,string theZip);
//function to set the address
//postcondition: address displayed as a string
string getStreet() const;
string getCity() const;
string getState() const;
string getZip() const;

addressType(string theStreet, string theCity, string theState, string theZip);
//contructor to set the string, city, state, zip
//postcondition: pull information from a file
addressType();
//default constructor

private:
string street;
string city;
string state;
string zip;
#endif
};
Sep 19 '06 #1
Share this Question
Share on Google+
2 Replies


Banfa
Expert Mod 5K+
P: 8,916
#endif

should be the very last line in the file barring comments
Sep 20 '06 #2

P: 7
Oh brother! I can't believe it was so simple! Thank you so much. I've been staring at this code for hours! :-)
Sep 20 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.