IDE

This is a discussion on IDE within the C++ Programming forums, part of the General Programming Boards category; Hi, Im using a tutorial CD to learn C++ and I have downloaded the miscrosoft express c plus plus 2008. ...

  1. #1
    Registered User
    Join Date
    May 2008
    Posts
    2

    IDE

    Hi,

    Im using a tutorial CD to learn C++ and I have downloaded the miscrosoft express c plus plus 2008. However, it is not the same as what the guy is using in the tutorial Im following (he is using 2005) nor does he explain (or anyone else on the i-net I can find) just how to do the basics.

    For example, when I want to enter some of the sample code from the tutorial how do I go about this. ie) When I click on "New" then "Project" there are 3 options which do I choose. Then depending on which I choose there are more options which I do not understand.

    Please Help. thank u

  2. #2
    Its hard... But im here swgh's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,475
    Im guessing you are using basic programming concepts.

    You would need:

    "Create New Project" -> "Win32 Project" ( then name it ) -> Hit OK -> "Next"-> Click on "Console application then click "Empty project" as this gets rid of the annoying pre-defined headers. Then click "Finish"and VC++ will create your project for you, allowing you to add files to it. I highly advise the first thing you add is a .cpp source file and name it "main"
    I'm just trying to be a better person - My Name Is Earl

  3. #3
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,167
    Note that while swgh says PCH is annoying, I'd say the contrary.
    You don't need to create an empty project, either. VC will automatically generate code for you so you can start writing code directly.

    The PCH issue is a matter of discussion around here, and all I can say is that you should decide what you prefer. PCH speeds up compilation by "precompiling" headers.
    All you do is put all common includes inside the stdafx.h file.
    The downside is that you must put #include "stdafx.h" in every source file.

    While PCH may not be required for small projects, I say there's no harm in trying and is good experience if you want to do larger projects.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.
    For information on how to enable C++11 on your compiler, look here.
    よく聞くがいい!私は天才だからね! ^_^

  4. #4
    Registered User
    Join Date
    Jan 2005
    Posts
    7,317
    >> The PCH issue is a matter of discussion around here
    And virtually everybody but Elysia says to turn them off for your simple learning applications.

    Checking the Empty Project box will save you a lot of hassle. It will also save people helping you on forums a lot of hassle because they won't have to do extra work to get your programs to compile if they want to help you.

    If you want to learn how to do big projects in VC++ later on you'll have plenty of time to learn pre-compiled headers. Until then leave them off.

  5. #5
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,167
    Quote Originally Posted by Daved View Post
    Until then leave them off.
    And that is exactly why I disagree. PCH is not a hassle and you are explicitly denying people from using them while they do not cause harm. Therefore I always recommend experimenting and seeing what they do feel best.
    Who are we to judge for them?
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.
    For information on how to enable C++11 on your compiler, look here.
    よく聞くがいい!私は天才だからね! ^_^

  6. #6
    Registered User
    Join Date
    Jan 2005
    Posts
    7,317
    They are a hassle. Why? Because if you turn them off then there is nothing else you have to do. If you turn them on, you have to make sure you #include "stdafx.h" first in every source file, you have to make sure you include the stdafx.h and stdafx.cpp files with your code if you move it around, and people helping you on forums won't be able to compile the code you post without modifying it or creating their own stdafx.h file.

    If you prefer to call them extra unnecessary work rather than a hassle, that's fine. That doesn't make it ok to recommend people use them when they are first starting.

  7. #7
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,892
    Who are we to judge for them?
    We are the people who have been on this board for years and have seen problems caused for newbies by PCHs quite regularly.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  8. #8
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,167
    Quote Originally Posted by Daved View Post
    If you prefer to call them extra unnecessary work rather than a hassle, that's fine. That doesn't make it ok to recommend people use them when they are first starting.
    On the other hand, it does not give us the right to tell them they are evil, should be avoided or are a pain, etc. Recommend not using PCH instead because they may be problematic.
    Besides that, creating an empty project is not the only way not to generate PCH either and a non-empty project is not a bad thing either.
    (And I will still disagree on that they are bad. One simple include in every source is not much of a hassle and a quick lesson, not a big headache reason to avoid PCH.)
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.
    For information on how to enable C++11 on your compiler, look here.
    よく聞くがいい!私は天才だからね! ^_^

  9. #9
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    20,968
    While PCH may not be required for small projects, I say there's no harm in trying and is good experience if you want to do larger projects.
    I agree, but only after the beginner becomes a novice who is able to recognise common standard headers and is not confused by the lack of precompiled headers.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  10. #10
    Registered User
    Join Date
    May 2008
    Posts
    2
    Wow, I didnt know that querstion would cause such debate. Thanks salem for your guide. Very helpful.

    Can anyone tell me what are the different methods availble for causing the console window to stay open.

    I already know
    Code:
    system ("pause")
    Are there any other lines of code which would perform the same operation (out of curiosity)?

  11. #11
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,167
    There are many.
    For C++, cin.get() is a typical way.
    Another is to rely on a GUI that can keep the console window open after the program finishes (Code::Blocks and Visual Studio are two).
    And yet another way is to put a breakpoint at the end of the function and use a debugger (very easy with Visual Studio).
    Then there's the C way, which is typically getchar().
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.
    For information on how to enable C++11 on your compiler, look here.
    よく聞くがいい!私は天才だからね! ^_^

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. IDE
    By djnorthyy in forum C++ Programming
    Replies: 6
    Last Post: 03-31-2008, 11:56 AM
  2. CBoard IDE of the year
    By cboard_member in forum A Brief History of Cprogramming.com
    Replies: 30
    Last Post: 12-09-2005, 06:50 AM
  3. 2 hdd, 1 ide
    By ElubHsif in forum Tech Board
    Replies: 6
    Last Post: 06-12-2005, 11:44 AM
  4. motherboard has 2 IDE socket?
    By beely in forum Tech Board
    Replies: 16
    Last Post: 10-30-2002, 09:55 PM
  5. HD on IDE 2
    By W.Churchill in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 03-13-2002, 07:53 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21