I have not found a solution yet, please help!
My header files are structs which house the declarations of my functions
and the associated CPP file houses the implementation.
I want to pass a string to my ADD and REMOVE but get compile errors..
///
//Profiles.H
///
#ifndef __PROFILES_H
#define __PROFILES_H
#include "string.h"
using namespace std;
struct Profiles
{
int MyProfile();
int AddTickerSymbol(string x);
int RemoveTickerSymbol(string x);
};
#endif
///
//Profiles.cpp
///
#include "Profiles.h"
#include <iostream>
#include "curl.h"
#include <string>
using namespace std;
int Profiles::MyProfile()
{
cout<<"Hello profiles"<<endl;
return(0);
}
int Profiles::AddTickerSymbol(string Input_From_User)
{
cout<<"ADD"<<endl;
return(0);
}
int Profiles::RemoveTickerSymbol(string Input_From_User)
{
cout<<"REMOVE"<<endl;
return(0);
}
///
//ERRORS
///file included from Profiles.cpp
expected `;' before '(' token
expected `;' before '(' token
no `int Profiles::AddTickerSymbol(std::string)' member function declared in class `Profiles'
no `int Profiles::RemoveTickerSymbol(std::string)' member function declared in class `Profiles'
[Build Error] [Profiles.o] Error 1
the errors are referring to lines in my .H File
int AddTickerSymbol(string x);
int RemoveTickerSymbol(string x);
What am I doing wrong?