The code is as follows:
******************************Code starts***********************
cpp
// trials.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include <string.h>
#include <conio.h>
using namespace std;
class String
{
char *s;
int length;
public:
String(const char *);
String();
//operator const char* const() {return s};
};
int main(int argc, _TCHAR* argv[])
{
cout << "Test line" << endl;
String const s1 = "abc";
String const s2 = "def";
getch();
//return strcmp(s1,s2);
return 0;
}
*******************************Code Ends*************************
when running this using visual studio 2005. I m getting 2 errors which i cant resolve. The errors are:
Error 2 error LNK2001: unresolved external symbol "public: __thiscall String::String(char const *)" (??0String@@QAE@PBD@Z) trials.obj
Error 3 fatal error LNK1120: 1 unresolved externals C:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\Projects\trials\Debug\trials.exe 1
Please Help. Thanks in advance.
** Edit **