# problem with programming c in dosbox



## zez (May 11, 2010)

i'm new to programming so i thought i'd learn c
ive download dosbox and turbo c++ because i got a book for christmas about c and the book recommends i use turbo c++ for c ( i have tried dev and visual c++ and i had problems with scanf w/ them)
ive configured the dosbox to run turbo on start up but once i get to compiling, dosbox has a problem
the code i entered is:

#include <stdio.h>
#include <conio.h>
main()
{
printf("hello world");
getch();
return 0;
}

the problem is that hello world isnt displayed anywhere after i compile (no errors come up when i compile btw) i was hoping someone could tell me how to get the text to pop up like it does with dev c++
thanks


----------



## Ninjaboi (Dec 27, 2010)

I did slight editing to the code you presented.


```
#include <stdio.h>
#include <conio.h>

int main()
{
    printf("Hello World");
    _getch();
    return 0;
}
```
Try that code. I compiled it just fine in Visual Studio. I also tested it in Dev-C++. See if that works for you.


----------



## snlkumar (Feb 3, 2012)

i want all steps to run a program of addition of 2 no. in dosbox...plz send it to my id that is <email removed by mod> as soon as possible


----------



## Ninjaboi (Dec 27, 2010)

Hello snlkumar!

You should create your own thread for this question, as this is an older thread and doesn't pertain enough to your question to be asked here. Are you wanting to add two numbers together ( 2 + 2 = 4 )?


----------

