Tuesday 13 March 2012

How to run Trubo C/C++ in Ubuntu using DOSBox Emulator

You can compile and run your C/C++ programs in Ubuntu also by using DOSBox Emulator. First of all you have to download DOSBox Emulator from USC [Ubuntu Software Center].





Then you have to mount you home directory by typing "mount c ~". Then you have to put your already installed TC directory in your home directory. You can install your TC also. Here I put my TC directory in home and open it as shown in snaps.




Now your TC is ready for work.



7 comments:

  1. Thanks for the tips on how to run Trubo C/C++ in Ubuntu using DOSBox Emulator. this was a helpful post.

    ReplyDelete
  2. why i am not getting output after running this code ::

    #include



    void main()



    {

    int i,j;



    for(i=0;i<11;i++);

    for(j=0;j<11;j++);



    if (i==5||j==5)

    printf("*");

    else

    printf(" ");



    }

    ReplyDelete
    Replies
    1. #include



      void main()



      {

      int i,j;



      for(i=0;i<11;i++);

      for(j=0;j<11;j++);



      if (i==5||j==5)

      printf("*");

      else

      printf(" ");



      }

      Delete
    2. according to your code, the control will transfer in else part of the condition so you can not able to see the blank space, try to put some text in printf and then try it . . .

      Delete
    3. put (J<i) jhattu

      Delete
  3. Where to get graphics library for ubuntu.

    I have tried libgraph1.0.2. But no luck methods like "setColor", "moveTo" etc.

    ReplyDelete