I've made a box in C++ code, that I want to use in a little C application I'm planning. How can I convert it to function? My Turbo C++ compiler doesnt seem to have the iostream.h. What is the best way to tackle my problem?
CODE
#include <iostream.h>
#include <conio.h>
void ramme(int a, int b, int c, int d)
{
int resetA = a, resetB = b;
/* sides */
textcolor(YELLOW);
textbackground(BLUE);
while (a<c)
{
gotoxy(a,b);
cprintf("%c", 205);
gotoxy(a,d);
cprintf("%c", 205);
a++;
}
a = resetA;
while (b<d)
{
gotoxy(a,b);
cprintf("%c", 186);
gotoxy(c,b);
cprintf("%c", 186);
b++;
}
b = resetB;
/* corners */
gotoxy(c,b);
cprintf("%c", 187);
gotoxy(a,b);
cprintf("%c", 201);
gotoxy(c,d);
cprintf("%c", 188);
gotoxy(a,d);
cprintf("%c", 200);
}
int main()
{
ramme(30,10,50,20);
return 0;
}