This is my C++ Project made in Turbo C++ in a week and submitted to CBSE in XIIth standard.
Who says one can't create GUI using Turbo C++? I took inspiration from Turbo C++ IDE itself and some other DOS applications built in Turbo C++. And what I built next is illustrated below.
"A Guide on Smart-phones" is a MS- DOS Console Application where you can browse smart-phones, their specifications, features, price, etc. Also, you can filter them as per your needs. Export to XLS is also available.
Everything for this project is built from scratch and not copied from elsewhere.
- Brief history of smart phones.
- Brief description on some important features of smart phones, viz. OS, Memory, etc.
- Some popular smart phones description.
- Filter Smart phones as required.
- Add more smart phones description.
- Interesting facts on smart phones.
You can see more (actually, a lot of) screenshots here
- This project purely uses Text mode of Turbo C++. GRAPHICS MODE IS NOT USED ANYWHERE!
- The animations are used everywhere : to draw boxes, borders, large text, etc.
- Images are just text shown by Block character
- File handling is used a lot to show data
- The headings are drawn using Text mode only.
- Each alphabet is represented using a char matrix of size 5x5
- To save this representation in a file, each alphabet was then converted to array of size 1x25 and seperated using new line.
- A function
lcon
was created which takes string, coordinates and colors as argument and prints the heading taking care of spacing.
void lcon(char s[],int x, int y,int c ,int bg)
{ int i,j,k,n;
textcolor(c);
textbackground(bg);
char ch,s2[100];
for(i=0 ; s[i]!=NULL ; i++)
{ ifstream fin("data\\text\\ab.dat");
while(!fin.eof())
{ fin.get(ch);
if(ch==s[i])
break;
}
for(j=0 ; j<5 ; j++)
{ fin.getline(s2,6,'+');
for(k=0 ; s2[k]!=NULL ;k++)
if(s2[k]=='*')
s2[k]='Û';
gotoxy(x,y+j);
cprintf(s2);
delay(5);
}
x+=6;
fin.close();
}
}
- You might be thinking the images shown are bitmaps but they are not. They are just text (char matrix) printed using Block character.
- Multiple functions were created to draw boxes, fill boxes, draw borders and for other animations. Some of the creations are illustrated below:
. | . |
---|---|
- An interactive menu controlled by arrow keys was created. Asking like "Enter your choice:" is no longer required. Look how cursor changes its position on pressing arrow keys. To select an option user just have to press Enter!
- Download this zip
- This zip contains required files for execution
- Extract downloaded zip in some folder named "x" in C drive.
- The exe will not run as is. You will need DOS-Box first for running this exe on Windows
- Download & Install DOS-Box from here
- Run DOS-Box. Execute command "mount C C:\[write-that-x-folder-name-here]" and then "C:"
- Then just enter this last command "MAIN" and voila! There you have it.
- You can use Username & Password in application as "a" for simplicity