Class and Object

Hi there,

I'm using codeblock, and below is the sourcecode I have tried to run.


#include <iostream>
using namespace std;

class Venessasclass
{
public:
void dailyproverb(){
cout << "you reap what you sow" << endl;

}

};


int main()
{
venessasclass venessassobject;
venessasobject.dailyproverb();

return 0;

}

After compiling and linking, a window pops up as usual, and instead of displaying "you reap what you sow," I only see "the process returned to 0 (0x0)"

No error was found in the sorucecode.

(In addition, an AVG virus detection window pops up, warning of virus.
I ignore this because I know that computer does this when the user tries to run an abnormal program.)

Any help, please?
Last edited on
Upper case and lowercase matters in C++, Venessasclass is different than venessasclass, captialize one or make the other lowercase and it should work fine.

I like codeblocks because it puts a little red square next to the first error that the program encounters, it just takes a bit of connecting the dots to find what the logical error actually is.

As far as the AVG detector thing, I ran your code both before and after the fix, and my AVG never threw any alarms, you might want to check the settings in AVG, and possibly run a full computer scan just in case.
Last edited on
Hi, newbieg,

Thank you for the reply.

Sadly, in my sourcecode, everything is in lower case. And it still does not run.

Taking your advice, I will surely run a full scan with AVG.
Topic archived. No new replies allowed.