I have two separate source codes and I want to implement them together like the first screen and then another screen in turbo c++. how do I do that?this is the first part/program that i want to interconnect with my second program/code.
#include<stdio.h>
#include<string.h>
#include<stdlib>
#include<graphics>
void main(){
int gd=DETECT,gm;
initgraph(&gd,&gm,"c:\\TURBOC3\\BGI");
{
setbkcolor(5);
setfillstyle(CLOSE_DOT_FILL,WHITE);
bar(100,100,200,200);
setfillstyle(CLOSE_DOT_FILL,WHITE);
bar(200,200,400,400);
settextstyle(3,0,5);
outtextxy(40,200,"diary management system");
settextstyle(3,0,2);
outtextxy(40,400,"press enter to continue");
getch();
closegraph();
}
//now my second part//
clrscr();
do{
setbkcolor(12);
setfillstyle(CLOSE_DOT_FILL,WHITE");
bar(100,100,200,200);
setfillstyle(CLOSE_DOT_FILL,WHITE");
bar(200,200,400,400);
settextstyle(3,0,5);
outtextxy(40,100,"CREATED BY:");
settextstyle(3,0,3);
outtextxy(40,200,"MICHELLE ");
settextstyle(3,0,3);
outtextxy(40,279,"IFRAH");
getch();
closegraph();
}
while(1);
}
What I have tried:
when i try to run both of these programs together only the first part runs while the second part doesn't.is there any way I can run both of these programs at the same time after entering?