Learning Cpp programming
Learn C++ with Hassan Javed Well, all the programming posted on this page is done on Turbo C++ compiler by borland.
Watch how to setup an Ubuntu Machine on AWS EC2.
https://youtu.be/wEZIdQbvtFU
The books I love about C++ are.
1. C++ How To Program by Deitel & Associates.
2. Object Oriented Programming In C++ by Robert Lafore.
2nd one is easy to read but 1st one contains in-depth understanding of C++.
Hello Guys! Thanks for liking my inactive page. I've been into Mobile Development with Xamarin.Forms that's why I couldn't post anything about C++. But In sha Allah. I'll try to post C++ stuff here. Like a course with details.
Assalam o alaikum, posting something after a long time,
This is circular queue implemented using array,,, here I am using struct and using all functions which can be used usimg class, then whats the differencebetween classesandstructs???
using namespace std;
const int SIZE = 5;
struct CQueue
{
private:
int que[SIZE];
int F, R;
CQueue();
bool isEmpty();
bool isFull();
void insert();
void del();
void displayData();
void menu();
public:
static void run();
};
int main()
{
CQueue::run();
}
CQueue::CQueue()
{
F = R = -1;
}
bool CQueue::isEmpty()
{
if( F == -1 )
return true;
else
return false;
}
bool CQueue::isFull()
{
if( F == (R + 1) % SIZE )
return true;
else
return false;
}
void CQueue::insert()
{
cout
first game!
void main()
{
int a = DETECT, b,X=-45,Y=-45,x,y;
char ch = 's';
srand(time(NULL));
initgraph(&a,&b,"c:\\tc\\bgi");
X = getmaxx()/2 - 45;
Y = getmaxy()/2 - 45;
while(ch != '\r')
{
if(rand() % 2 == 0)
{
x = (getmaxx()/2) + (rand() % 40);
y = (getmaxy()/2) + (rand() % 40);
}
else
{
x = (getmaxx()/2) - (rand() % 40);
y = (getmaxy()/2) - (rand() % 40);
}
while(ch != '\r')
{
circle(x,y,3);
circle(X,Y,5);
rectangle(getmaxx()/2+50,getmaxy()/2+50,getmaxx()/2-50,getmaxy()/2-50);
outtextxy(50,50,"Press w,s,a,d to play");
outtextxy(50,70,"Press ENTER to eixt");
outtextxy(50,90,"Press any other key to pause");
outtextxy(50,110,"Score, doesn't know how to show variables");
if(kbhit())
ch = getch();
switch(ch)
{
case 'w':
if(Y = x && (X-7) = y && (Y-7)
This code can convert numbers (1 - 99999999) to english words.
void main()
{
long num;
char repeat='h';
while(repeat!='N')
{
clrscr();
coutnum;
int r1,r2,r3,r4,r5,r6,r7,r8;
r8=num%10; num/=10;
r7=num%10; num/=10;
r6=num%10; num/=10;
r5=num%10; num/=10;
r4=num%10; num/=10;
r3=num%10; num/=10;
r2=num%10; num/=10;
r1=num%10;
switch(r1)
{
case 1:
cout
code:
/*stdlib.h is used for exit() function whice terminates program*/
int main()
{
clrscr();
char quit='h'; //to control the loop of program
char undo='h';
int Seats[11][5],row=0,column=0,count=0;
int i,j;
for(i=0;i
At the beginning of the semester my teacher told me to make a seat reserving program, today I started it and I am making pretty much success, just have to add delete or modify option and the class for making objects: for collecting data of each person. Thanks to Allah Subhanahu wa Ta'ala.
"iostream.h"
"conio.h"
void Title();
void main()
{
int Seats[20], InitSeats,SeatNo;
char cycle='L';
for(InitSeats=0;InitSeats
21/02/2017
Program to print Pascal's Triangle within 5 rows.
"iostream.h"
"conio.h"
void main()
{
clrscr();
int a,b,c, num;
for(a=0;a
19/02/2017
And I think this one's called bubble sorting!
"iostream.h"
"conio.h"
void main()
{
clrscr();
int A[100], i,j,n, temp;
coutn;
for(i=0;i>A[i];
cout
Click here to claim your Sponsored Listing.
Category
Contact the business
Telephone
Website
Address
Gujranwala