I am making a project.
This is a function declaration in a separate file.
void PrintLines(int characterValue, int characterCount, int lineCount)
When I prototype in my main file I use:
void PrintLines(char characterValue, int characterCount, int lineCount);
This will not compile. Are there any methods I can use to make it type char in the main method without changing the first int type(in the other file?
I think I have to type cast. Just have to figure out how.
Basically, the code has to be
void PrintLines(int characterValue, int characterCount, int lineCount)
for file 1 and
void PrintLines(char characterValue, int characterCount, int lineCount);
for main. I might need to convert ASCII to char…
You can overload functions like this but the two function have a different signature, i.e., during linking it will fail. I’m not sure what you try to achieve but it might work to delegate: