Turbo C/C++ and other junk compilers help, discussions and queries here

godsownman

Padawan
Borland C is available. it is 99.99% same . You can dload it from here.

*www.pitt.edu/~stephenp/misc/downloadTC.html

However if u need TURBO C only then please PM me with ur email and I shall mail it .

Regards
 

Maverick340

Ambassador of Buzz
MAkeing those pyramid programs and i really didnt understand how 2-d arrays work(both string and integers).
 

anubhav_har

In the zone
so you need ebooks, i think that.. go through yashwant kanetkar's let us c book. Its around 110 rs. cost.. go buy one.. its a must have for all beginners for c
 

sakumar79

Technomancer
i found Bruce Eckels "Thinking in C++" very thorough. Be warned though that it may appear to be a bit challenging to start off with it. You can download it at *www.mindview.net/Books/TICPP/ThinkingInCPP2e.html

Arun
 

aadipa

Padawan
@The Incredible

You wanted the tower of hanoi code

Code:
// Textual Tower Of Hanoi Solution

#include <conio.h>
#include <iostream.h>

enum POLE { LEFT, MIDDLE, RIGHT };
void transfer(int n, POLE from,POLE to, POLE temp);

const char * poles[3] = { "LEFT  ",
			  "MIDDLE",
			  "RIGHT " };

const int MAX_DISK_SIZE = 30;

class Stack {
   public :
      Stack() {
	 toc = 0;
	 }

      ~Stack() {
	 }

      unsigned short length() {
	 return toc;
	 }

      int get() {
	 if(toc == 0)
	    return -1;
	 else
	    return element[toc-1];
	 }

      void pop() {
	 toc --;
	 }

      void push(int i) {
	 element[toc++]=i;
	 }

   private :
      int toc;
      int element[MAX_DISK_SIZE];
   };


Stack Pole[3];

void main(void) {

   int n,i;

   clrscr();

   cout << "\nWelcome to the TOWER OF HANOI program by Ashish Patil"<<endl;
   cout << "\nHow many disks ? ";
   cin  >> n;

   for(i=0;i<3;i++) {
      Pole[i] = Stack();
      }

   for(i=n-1;i>=0;i--) {
      Pole[LEFT].push(i);
      }

   transfer(n, LEFT, RIGHT, MIDDLE);

   cout <<"Process complete. Press any key to exit";

   getch();

   }

void transfer(int n, POLE from, POLE to, POLE temp) {

   if( n > 0) {
      transfer( n-1, from, temp, to);
      cout << "Move disk "<< n
	   << " from " << poles[from]
	   << " to " << poles[to]
	   <<endl;
      transfer( n-1, temp, to, from);
      }
   }

Let me find the code which i made using C graphics... I will post that link too...
 

aadipa

Padawan
Ok found it.. the code is little big so i will post it only if any1 wants... PM me for that

Here is the executable file *www.sourabh.net/files/tower.exe

It is executable file, just run the file, select no of disks and type of motion, keep in mind, the animation is really slow, but I have kept higher speed for more no of disks...
 

the_moon

Journeyman
Robert Lafore Galgotia Publications.
I remember seeing the code of Tower Of Hanoi in it.. Sorry that I'm unable to provide the code rightnow.
 

the_moon

Journeyman
amanwannalearn said:
I hated that book!rubbish!
actually i picked up let us c++.
Found it worthl;ess

Da Best Book any beginner of C++ can have is Sumita Arora.
Its very simple, yet very very informative. It covers everything from Loops to arrays to Classes to Pointers.

Highly Recommended for beginners! :!:
 

The Incredible

Ambassador of Buzz
well thanks a lot. i rocked my theory n practical exams.

my teacher said i'm da only guy who hav answered 9/10 answers correctly. i did only one wrong question. it was asked to do by switch but mistakenly i did it by else-if.


Thanks Everyone!!!

i'm unable to find da symbol which luks like "II" and means "or" in C++ on my keyboard plz help me.
 

Maverick340

Ambassador of Buzz
the_moon said:
amanwannalearn said:
I hated that book!rubbish!
actually i picked up let us c++.
Found it worthl;ess

Da Best Book any beginner of C++ can have is Sumita Arora.
Its very simple, yet very very informative. It covers everything from Loops to arrays to Classes to Pointers.

Highly Recommended for beginners! :!:

Dude thats our cource book!!Ya it nice but i dont like it..loads of error and no examples !CRaPPPY book!
 

Thor

Ambassador of Buzz
Sumita Arora is the Course Book 4 ISC and CBSE..He must be in 11th/12th .
Try This :
WAP to Display all combinations of a 5 lettered word (No repeatations of letter)

then
WAP to which will check a series of Numbers given then Find out the number which doesn't belong to the series.It will then remove that number and replace it with the correct number.

Savvy??
 

The Incredible

Ambassador of Buzz
anubhav_har said:
Good work man.. now you can start learnign C++ and not just taking the codes and writing em down...

Thanks!!!

I'm havin holiday from day after tomorrow to 13th which is mor than i need read those. I hop i'll know abt it as much as i can within these days.

Bye.
 
Top Bottom