#c++ wchar_to_char is undefined

1 messages · Page 1 of 1 (latest)

turbid plover
#

anyone knows why it comes up as undefined ?

mellow thistle
mellow thistle
# turbid plover anyone knows why it comes up as undefined ?

maybe a header entry is missing or if its in the same file it hase to be over the function where its getting called like

int main()
{
WcharToChar();
}

char WcharToChar()
{

}

// this will cause an error 

char WcharToChar()
{

}

int main()
{
  WcharToChar();
}

// this will work

//or u do if u have it in a different file

//main.cpp
#include "Utils"
int main()
{
  WcharToChar();
}

// utils.h
#pragma once
char WcharToChar();

//utils.cpp

char WcharToChar()
{

}

// this is how u can store it in an external file but call it from main.cpp
#

but keep in mind this is like pseudocode this will cause errors if copied 1to1