Simple Error that keeps popping up..

Hello all,

I'm working through a C++ book, and the past couple examples I'm getting the error:

error: expected ";" before string constant
error: statement has no effect

now I've gone through the code a million times and can't figure out the issue. Any help would be greatly appreciated!

#include <iostream>

class SimpleCat
{
public:
SimpleCat();
~SimpleCat();
private:
int itsAge;
};

SimpleCat::SimpleCat()
{
std::cout << "Constructor Called\n";
itsAge = 1;
}

SimpleCat::~SimpleCat()
{
std::cout << "Destructor called \n";
}

int main()
{
std::cout << "SimpleCat Frisky ... \n";
SimpleCat Frisky;

std::cout << "SimpleCat *pRags = new SimpleCat ... \n";
SimpleCat *pRags = new SimpleCat;

std::cout << "delete pRags.. \n";
delete pRags;

std::cout "Exiting, watch Frisky go ... \n";
return 0;
}




Thank you!
You forgot << between std::cout and the string literal.
Well, I officially feel like the dumbest person on earth..LOL


Thank you
Topic archived. No new replies allowed.