Im implementing a C++ program, for project reasons it must be turned in one file so I cannot put what you normally would into a separate header file, it is just at the top of my file. I'm getting this error
project1.cpp:194:12: error: expected unqualified-id OrderOfOps(const std::string& in) ^ project1.cpp:194:12: error: expected ')' project1.cpp:194:11: note: to match this '(' OrderOfOps(const std::string& in)
Here are the lines of code in question: Constructor part which would be a header:
class OrderOfOps
{
public:
// Constructor
OrderOfOps(const std::string& in);
private:
std::string m_inString;
};
Problem Area:
bool IsNumber(const std::string& num)
{
std::string::const_iterator it = num.begin();
// Look up locale method
while (it != num.end() && std::isdigit(*it, std::locale()))
{
++it;
}
return !num.empty() && it == num.end();
}
// Constructor
OrderOfOps(const std::string& in)
{
m_inString = in;
}
Aucun commentaire:
Enregistrer un commentaire