TITLE. The function i'm using is this:
void GetVideoCardInfo(int* memoryVar, char* cardName)
{
strcpy_s(cardName, 128, m_videoCardDescription);
*memoryVar = m_videoCardMemory;
return;
}
m_videoCardDescription is a '128 character long' character array that has the description of my video card in it. Here is where I am calling the function:
bool writeGPUnameDesc() {
char cardDesc;
int cardMem;
m_D3D->GetVideoCardInfo(&cardMem, &cardDesc);
std::ofstream myfile;
myfile.open("gpuNameAndDesc.txt");
myfile << "Graphics card name: " << cardDesc;
myfile << " - Graphics card memory: " << cardMem;
myfile.close();
return true;
}
When I run the program a message box pops up that says Runtime-check failure #2 and the title. If anyone can help thanks in advance.