Hi!

Even when I use windows versions of C++ compilers (Visual studio or Borland) when I compile my program it opens up in a DOS window. Is VB the only way the program will open up in a windows like window?

Thanks,
Ami

Recommended Answers

All 6 Replies

Member Avatar for iamthwee

What do you want to do? Learn c++ or make window applications.

> Is VB the only way the program will open up in a windows like window?
You have a choice - create a console application, or create a windows application (or several other types as well).

Console (what you call DOS, but it isn't) begin with main()
Windows GUI programs begin at WinMain()
DLL's begin at DllMain()

C++ compilers for MS-Windows operating system can compile either console programs, which normally opens a DOS-like window, or a GUI window like you see with your VB compiler. The reason is that many c++ programs do not need GUI windows because they do things that do not require a GUI or human interaction.

>>Is VB the only way the program will open up in a windows like window?
No, Visual Studio C++ can create them too (so can Borland and many other compilers). When you create a new project you have a choice of either creating a Console application or a Windows application. But windows programs are not as easy to code with C++ as they are with VB. Here is a tutorial to get you started, but you will need a basic understanding of C language.

commented: nice clear help +1

Well you learn new things every day...(And I've been in a programming course for almost a year now!!!)

Well you learn new things every day...(And I've been in a programming course for almost a year now!!!)

Most C++ courses will only teach you a subset of the base language and not focus on graphics APIs that would complicate the lessons. That's a bit of a shame, but if you had to learn C++ and Win32 at the same time, it would be devastating. ;)

C++ compilers for MS-Windows operating system can compile either console programs, which normally opens a DOS-like window, or a GUI window like you see with your VB compiler. The reason is that many c++ programs do not need GUI windows because they do things that do not require a GUI or human interaction.

>>Is VB the only way the program will open up in a windows like window?
No, Visual Studio C++ can create them too (so can Borland and many other compilers). When you create a new project you have a choice of either creating a Console application or a Windows application. But windows programs are not as easy to code with C++ as they are with VB. Here is a tutorial to get you started, but you will need a basic understanding of C language.

Nice tutorial, thanks for posting that link :mrgreen:

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.