hi friends
i have this error (Error 2 error LNK1120: 1 unresolved externals C:\Users\Aqeel\Documents\Visual Studio 2010\Projects\Aqeel string 3\Debug\Aqeel string 3.exe
)
can any one tell me how to fix it ?
my code is
#include "stdafx.h"
#include <iostream>
#include <conio.h>
#include <string>
#include <string.h>
usingnamespace std;
void deleteChar(string,char);
int mian()
{
string A="this is my programme";
char a;
cout<<"\nenter the character that you want to count: ";
cin>>a;
deleteChar(A,a);
getch();
return 0;
}
void deleteChar(string A,char a)
{
int b=A.find(a);
for(int i = 0; i < A.length(); i++)
{
A.erase(b);
}
cout<<A;
}
----------------------------------------------------------
My other comments referred to the fact that somewhere in the middle of the messages is the piece of useful information, which tells you what is wrong. When a program is compiled and linked, various names such as function names are stored internally in a slightly different format, hence you see "_main" rather than just "main" in the message. It's worth remembering that, because sooner or later you'll meet similar errors in the future, and if you know how to interpret the error messages, then you have a clue as to what might need to be changed in order to fix it.