473,378 Members | 1,382 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,378 software developers and data experts.

Error C2084 - body already exist

I am getting this error when I try to compile. I am using
visual studio c++ 7.0

I have a my file.h with the following:
( non member functions)
Bag operator +(const Bag& b1, const Bag& b2);
Bag operator -(const Bag& b1, const Bag& b2);
and I have my cpp file with

Bag operator +(const Bag& b1, const Bag& b2)
// Library facilities used: assert.h
{
Bag answer;

assert(b1.size( ) + b2.size( ) <= Bag::CAPACITY);
answer += b1;
answer += b2;
return answer;
}

// subtract amount of bag2 from bag1
Bag operator -(const Bag& b1, const Bag& b2)
// Library facilities used: assert.h
{
Bag answer;

assert(b1.size( ) - b2.size( ) <= Bag::CAPACITY);
answer += b1;
answer -= b2;
return answer;
}

why does it think it alreay exist?
Nov 16 '05 #1
1 3631
>I am getting this error when I try to compile. I am using
visual studio c++ 7.0


Can you produce a stand-alone piece of code that illustrates the error
you're getting.

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Philip Ronan | last post by:
OK, here's my 2p worth: === Q. Why am I getting the error message 'Headers already sent'? A. PHP produces this error message when you try to set a header for a web page after you have already...
4
by: Daniel Polansky | last post by:
Is there a way to open file for writing so that the opening fails if the file already exist? This needs to be atomic operation so that it is possible to use the file as a semaphore. As a result,...
3
by: Roger | last post by:
How can I check if a field already exist in a table? If it doesn't exist I want to add it with ALTER TABLE ADD...
1
by: Neo | last post by:
Hi, I have dumped a database into the file named dbase.sql when I am trying to recreate the database its giving the following error. can any one help me in this regard? # vim dbase.sql # mysql...
2
by: pointBoarder | last post by:
Good morning all and thanks for taking the time to read this. So I have this recursive function that finds child parts from a master parent parts list. Currently I'm using sqlcmd2 = "INSERT...
1
by: sethuganesh | last post by:
HI, i have ported vc++ 6.0 code to visual studio 2005. During batch build in debug mode i din't get any error.But if i build the same in release mode i am getting the following error. ...
2
by: =?Utf-8?B?SDIw?= | last post by:
I'm having a problem with the access control in windows server 2003. I have set in our server that user can access, modify, read and write folders/files but not able to delete folders, subfolders...
31
by: ladybanks | last post by:
Hello Everyone, I am developing a software to load data from 2 separate tables. Each time data is loaded, i want to log the max (date/time) of each table into a scheduler table (third table). I...
2
by: awigren | last post by:
I just finished my database, and now I have to import the updated information into the tables that already exist so that all the links stay the same. I had a person in the office assisting me, but...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...

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.