How can i fix this issue?
currently i have my public/private class constructed and now trying to just compile the functions within them. They contain no code and it seems to be an issue between the functions in the .cpp and the .h files. It says the functions do not exist in the header but I thought I formatted the functions correctly.
//---------------------------------------------------
// Filename: Tweet.cpp
// Purpose: The implementation of the Tweet class
//---------------------------------------------------
#include <fstream>
#include <iostream>
#include <string>
#include <iomanip>
#include "tweet.h"
usingnamespace std;
//-------- Constructors and Destructors -------------
// Default constructor
Tweet::Tweet()
{
}
// Non-default constructor
Tweet::Tweet(const string Date, const string Hashtag, const string Contents)
{
}
// Copy constructor
Tweet::Tweet(const Tweet &OtherTweet)
{
}
// Destructor
Tweet::~Tweet()
{
//Do Nothing
}
//-------- Mutators ---------------------------------
void Tweet::Set(const string Date, const string Hashtag, const string Contents)
{
}
bool Tweet::FillTweet(ifstream &Din)
{
bool Success = false;
return Success;
}
//---------------------------------------------------
// Fill a single Tweet from a stream (open file)
// Returns true if able to read a tweet; false if end of file is encountered
// Assumes that each line in the file is correct (no partial tweets)
//-------- Accessors --------------------------------
// Get all instance variable values
void Tweet::Get(string &Date, string &Hashtag, string &Contents)
{
}
// Return the date
string Tweet::GetDate()
{
string Content;
return Content;
}
// Return the hashtag
string Tweet::GetHashtag()
{
string Content;
return Content;
}
// Return the contents
string Tweet::GetContents()
{
string Content;
return Content;
}
//-------- Other Useful Methods ---------------------
// Print one tweet
void Tweet::Print()
{
}
// Return true if the other tweet has the same date
bool Tweet::SameDate(const Tweet &OtherTweet)
{
bool Success = false;
return Success;
}
// Return true if the other tweet has the same hashtag
bool Tweet::SameHashtag(const Tweet &OtherTweet)
{
bool Success = false;
return Success;
}
// Return true if the other tweet has the same contents
bool Tweet::SameContents(const Tweet &OtherTweet)
{
bool Success = false;
return Success;
}
The error im getting is this while compiling:
1>------ Build started: Project: Project2, Configuration: Debug Win32 ------
1> Tweet.cpp
1>c:\users\ian\documents\visual studio 2012\projects\project2\project2\tweet.cpp(53): error C2511: 'void Tweet::Get(std::string &,std::string &,std::string &)' : overloaded member function not found in 'Tweet'
1> c:\users\ian\documents\visual studio 2012\projects\project2\project2\tweet.h(10) : see declaration of 'Tweet'
1>c:\users\ian\documents\visual studio 2012\projects\project2\project2\tweet.cpp(58): error C2511: 'std::string Tweet::GetDate(void)' : overloaded member function not found in 'Tweet'
1> c:\users\ian\documents\visual studio 2012\projects\project2\project2\tweet.h(10) : see declaration of 'Tweet'
1>c:\users\ian\documents\visual studio 2012\projects\project2\project2\tweet.cpp(65): error C2511: 'std::string Tweet::GetHashtag(void)' : overloaded member function not found in 'Tweet'
1> c:\users\ian\documents\visual studio 2012\projects\project2\project2\tweet.h(10) : see declaration of 'Tweet'
1>c:\users\ian\documents\visual studio 2012\projects\project2\project2\tweet.cpp(72): error C2511: 'std::string Tweet::GetContents(void)' : overloaded member function not found in 'Tweet'
1> c:\users\ian\documents\visual studio 2012\projects\project2\project2\tweet.h(10) : see declaration of 'Tweet'
1>c:\users\ian\documents\visual studio 2012\projects\project2\project2\tweet.cpp(80): error C2511: 'void Tweet::Print(void)' : overloaded member function not found in 'Tweet'
1> c:\users\ian\documents\visual studio 2012\projects\project2\project2\tweet.h(10) : see declaration of 'Tweet'
1>c:\users\ian\documents\visual studio 2012\projects\project2\project2\tweet.cpp(85): error C2511: 'bool Tweet::SameDate(const Tweet &)' : overloaded member function not found in 'Tweet'
1> c:\users\ian\documents\visual studio 2012\projects\project2\project2\tweet.h(10) : see declaration of 'Tweet'
1>c:\users\ian\documents\visual studio 2012\projects\project2\project2\tweet.cpp(92): error C2511: 'bool Tweet::SameHashtag(const Tweet &)' : overloaded member function not found in 'Tweet'
1> c:\users\ian\documents\visual studio 2012\projects\project2\project2\tweet.h(10) : see declaration of 'Tweet'
1>c:\users\ian\documents\visual studio 2012\projects\project2\project2\tweet.cpp(99): error C2511: 'bool Tweet::SameContents(const Tweet &)' : overloaded member function not found in 'Tweet'
1> c:\users\ian\documents\visual studio 2012\projects\project2\project2\tweet.h(10) : see declaration of 'Tweet'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========