Mark.h

#pragma once    //i am using visual c++ 2008 compiler/ide, this is equvilaent 
to #ifndef mark_h... etc...
#include <string>       //is this part needed here?
class MyClass
{
public:
        int id;
        MyClass(int);
        
        ~MyClass(){}
        
        string func()  // i want this function to return the string below, but 
it doesnt
        {
                return "6767";
        }

};
--------------------------------------------------------------------
Mark.cpp
#include "Mark.h"

MyClass::MyClass(int id)
{
        this->id = id;
}
---------------------------------------------------------------------
Main.cpp

#include "Mark.h"
#include <iostream>
using namespace std;

int main()
{
        MyClass M(299);

        cout << M.func() <<endl;

        return 0;
}

ive got 8 errors.
please help me solve the problem.
thanks

Reply via email to