Link to home
Start Free TrialLog in
Avatar of mov
mov

asked on

Watcom c++ 10.6

I don´t understand how to make my first program with
watcom c++ 10.6 for windows. How can i make "hello world!" window + when i push some key on keyboard it ends, so how im going to do that with watcom?!? is there anymore void main (void).. or something like that.. what is the basic form to code with watcom under windows?
Avatar of yonat
yonat

C++ answer:

#include <iostream.h>

int main()
{
    cout << "hello world!";
    return 0;
}


C answer:

#include <stdio.h>

int main(void)
{
    printf("hello world!");
    return 0;
}

Avatar of mov

ASKER

I didn't get any window that shows me "Hello world!".
The above code from yonat should be OK, if you you have set the program type to Win32 console and run it under Windows95/NT. For creating a real GUI Windows app, you should include <windows.h> and use WinMain() as your startup function. There should be a lot of examples around. Go to any book store you'll find one.

Avatar of mov

ASKER

Edited text of question
Avatar of mov

ASKER

Ok, i changed the question to more understand form. i meant that it works with windows 95. And still when im running that program it doesnt show me anything. So i want that hello world!
in my screen.
ASKER CERTIFIED SOLUTION
Avatar of kw040597
kw040597

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mov

ASKER

i grade KW's answer good, because for an excellent there should be comments what some of those lines do in code?

like :

PAINTSTRUCT ps;  // this is xxxx.

but that example did work, and im very pleased.