Ok, so i am creating a fairly simple data class for my own kind of font file system. What i want it to do is read data from a file and input that data into a class. However, i cannot get my code to compile, i get around 9 linker errors, and i don't know what part of the code is causing the errors. What i do see is that all the errors are preceded by the warning LNK4058 which says: "defaultlib 'libcmt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library", that is what i think i problem is, but i do not have that much experience with linker errors. The linker errors are LNK2019 or LNK2001 errors and they are unresolved external symbols. I am using MVC++ 2008 on Windows 7. Any help is appreciated and here is the code.
#include <vector>
#ifndef FONT_DATA_H
#define FONT_DATA_H
usingnamespace std;
class CharacterData
{
private:
char characterCode;
int rowNumber;
int startX;
int endX;
public:
CharacterData();
CharacterData(char character, int row, int start, int end);
~CharacterData();
char getCharacterCode();
int getRowNumber();
int getStartX();
int getEndX();
};
class FontData
{
private:
int characterCodeBeginsAt;
int characterCodeEndsAt;
int spaceCharacterWidth;
int numberOfRows;
vector<int> rowStartingYValues;
int rowHeight;
int newLineHeight;
bool validData;
vector<CharacterData> characterDataValues;
FontData();
public:
FontData(char* fontDataFileName);
~FontData();
int getCharacterCodeBeginsAt();
int getCharacterCodeEndsAt();
int getSpaceCharacterWidth();
int getNumberOfRows();
int getRowStartingYValue(int row);
int getRowHeight();
int getNewLineHeight();
CharacterData getCharacterDataValue(char characterCode);
};
#endif