cconio

I can't do the function "putchxy" of <conio2.h> work


I've started the course of computer science this year and even then I have never studied anything about programming, so maybe this is why i am having so many basic mistakes like this.

My problem right now is with the library in C that I have to use to do my final work in the course, which is a game.

My professor passed some activities for us to learn how to use the conio, but for now the only thing that I could do was to install it. The first activitie is "2) Create a void function that print a letter read from the keyboard in the position (x, y) using the Conio functions.". Searching in the functions, I founded that the function "putchxy" does exactly this, but when I try to compile the program with it, I think that it isn't doing absolutly nothing, because it should print the readen charecter and it does nothing. I used abritary values defined inside the program for x and y.

#include <stdio.h>
#include <conio2.h>
#include <conio.h>

int main () 
{ 
char ch; 
int x = 5, y = 5;

printf("Type a letter in the keyboard:\n");
scanf(" %c", &ch);
void putchxy (int x, int y, char ch);

return (0);
}

As this was the last class, I am with a lot of questions if I am doing this right. But looking in the presentation of the class, reading about the function inside the library itself, searching similar cases here in stack overflow, i couldn't find nothing that indicates me my mistake.

I already tried other ways, like create myself a function, tried to invert, to put numbers, but any form like those worked propely.

Where's my mistake?

I know that it is an outdated library, but it's obligated in this project to use it. It's the firs semester, I think that it makes sense. I don't need any objection to its use, thank you.

Sorry for any English mistake, it is my second language.


Solution

  • regarding:

    void putchxy (int x, int y, char ch);
    

    this is the prototype for the function.

    TO actually call the function use:

    putchxy( x, y, ch );