473,408 Members | 1,841 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

error missing ; but can't find where

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
2 1473
Banfa
9,065 Expert Mod 8TB
#endif

should be the very last line in the file barring comments
Sep 20 '06 #2
jrjan1
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

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

Similar topics

29
by: shank | last post by:
1) I'm getting this error: Syntax error (missing operator) in query expression on the below statement. Can I get some advice. 2) I searched ASPFAQ and came up blank. Where can find the "rules"...
2
by: Kathy | last post by:
Hi All, I have several users who are getting a compile error "Can't find project or library when the code hits Dim cat as ADOX.Catalog In the references dialog box it show the msadox.dll as...
6
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much...
102
by: Skybuck Flying | last post by:
Sometime ago on the comp.lang.c, I saw a teacher's post asking why C compilers produce so many error messages as soon as a closing bracket is missing. The response was simply because the compiler...
9
by: Tim D | last post by:
Hi, I originally posted this as a reply to a rather old thread in dotnet.framework.general and didn't get any response. I thought it might be more relevant here; anyone got any ideas? My...
2
by: Iams | last post by:
When your program gets an error, is there a name of that Exception somewhere on that error page so that you can trap it with the correct exception name? For instance, I errored when attempting to...
4
by: Issac | last post by:
Hi, I am working on error handling for my project. I got the following code from the web which declare that it can catch all exceptions in my project rather that using TRY CATCH in everything...
0
by: Sean Quilty | last post by:
Help! We are getting the following errors on a slave server: 060304 7:42:03 Error reading packet from server: Could not find first log (server_errno=65535) 060304 7:43:03 Slave: Failed...
5
by: elie.constantine | last post by:
Hello A person developed a Microsoft Access Solution and gave me the MDE file. When I tried to run it, I got "Function is not available in expressions in query expression 'Trim([......" Error. ...
2
by: im2cre8iv | last post by:
Here is my code where I am receiving the error: #include <fstream> #include "BinaryTree.h" using namespace std; Node* BinaryTree::MakeTree(ifstream& infile) { char name; infile>>name;
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.