0
Linking...
Main.obj : error LNK2001: unresolved external symbol "int __cdecl ConvertANSI(char)" (?ConvertANSI@@YAHD@Z)
Debug/szStub.exe : fatal error LNK1120: 1 unresolved externals

Defined:

#include <windows.h>
#include <math.h>
#include <iostream>
using namespace std;

int ConvertANSI(char sChar);

Function:

// Credits to Dave
int ConvertANSI(char szText[])
{
	return static_cast<int>(szText[0]);
}

Usage:

if(ConvertANSI(szChar) >= 48 && ConvertANSI(szChar) <= 57)
	{
		szToggle = true;
	}

any ideas lol?

2
Contributors
3
Replies
4
Views
9 Years
Discussion Span
Last Post by mitrmkar
0

The prototype and the definition mismatch ..

int ConvertANSI(char sChar [] );
int ConvertANSI(char szText [] )
{
	return static_cast<int>(szText[0]);
}
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.