By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,613 Members | 1,890 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,613 IT Pros & Developers. It's quick & easy.

Microsoft Visual C++ 2005 Express Edition or dev-C++??

P: 6
hey, i've got these two programs:Microsoft Visual C++ 2005 Express Edition and Dev-C++, but i want to choose the best , wich one?
when i start Microsoft Visual C++ 2005 then i select file >> new >> project , then a screen appears, but i want to set a program with the beggining with this:
#include <iostream.h>

void main()


but what must i choose , there is soo many:class library, CLR, empty project, WIN32 console application,...........
i dont know wich of these choises begins with:
#include <iostream.h>

void main()


thanks for answering, ah i forgotn something, its just : i want to make a program ,but what to choose?
Aug 14 '07 #1
Share this Question
Share on Google+
4 Replies

Expert 100+
P: 671
Both IDEs use well known and reputed, quality compilers, so either one will do. Although since you are on Windows, you may want to prefer VC++ for (a) future support of Windows specific SDKs and (b) the debugger.

Your example program beginning is faulty. Get a better learning resource. C++ Primer by Lippman or Accelerated C++ by Koenig are solid beginner choices. If you have to go through a website, stick to or . The correct beginning program should be along the lines of:
Expand|Select|Wrap|Line Numbers
  1. #include <iostream>
  3. int main()
  4. {
  5.     std::cout << "Hello, World!" << std::endl;
  6.     return 0;
  7. }
There may be slight variations. But telltale signs of an accurate resource are <iostream>, not <iostream.h> and int main, not void main.

but what must i choose , there is soo many:class library, CLR, empty project, WIN32 console application
You are writing (and will be for a long while) a standard C++ console application. Hence, either choosing Win32 console application, or empty project and then the appropriate settings, will do.
Aug 14 '07 #2

Expert 10K+
P: 11,448
Normally I start reading the manuals and then I'll try the different options I have.
But I know I'm an exception to the rule.

kind regards,

Aug 14 '07 #3

P: 6
but i've read in the book that it's void main() and <iostream.h>, but i think it's i time ago that void was used, cause the book is of the year 1997, is that the problem,?
Aug 14 '07 #4

Expert 100+
P: 671
A similar question was just asked and answered. main has always returned an int. A few compilers decided to allow void as well. However, C++ is a standard language, so these compilers broke the standard in that sense. If you try to use void main in any modern standards conforming compiler, including the recent VC++ editions, you will get at least a warning, if not a compile-stopping error.

<iostream.h> was the old header format in C++. All headers in the standard library, in C++, do not have the .h. C++ headers just have the .h part removed. C headers in modern C++ are prefixed with a c. Examples:

Expand|Select|Wrap|Line Numbers
  1. //Before, <iostream.h>
  2. #include <iostream>
  3. // Before, <fstream.h>
  4. #include <fstream>
  5. //Before <stdlib.h> (C library)
  6. #include <cstdlib>
cause the book is of the year 1997, is that the problem,?
That would be the problem. The last revision was in 98/99. Significant changes were made, so it's important you get a modern book. C++ Primer (4th Edition) by Lippman and Accelerated C++ by Koenig are well recognized and ideal learning books. They are worth the money. Generally, if you see void main or iostream.h, walk away. If the book mentions the STL at the very end, walk away. If you see the book start out with C-style strings instead of C++ style, that's a bad sign.
Aug 14 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.