Thread: Need help starting up :)

  1. #16
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Well you can forget any book which begins with void main!

    How about this reading list?
    http://rudbek.com/books.html

    > Where can I learn modern C++?
    If you're looking online, then
    - Avoid anything that uses <iostream.h>, or worse, conio.h
    - Avoid anything which uses void main
    - Avoid anything which mentions a specific compiler - chances are, it won't work with other compilers.
    - Consider anything that uses <iostream> and using namespace std;
    - Consider anything that uses int main


    > Also can someone tell me books on compilers and how different compilers work and what is the significance?
    The whole point of learning standard C++ is that you shouldn't have to care about which compiler you're using.

    In order, you should learn:
    The standard C++ language (and how to design programs as well - you can't write a meaningful program without a half-decent plan).
    The standard C++ template library
    Portable libraries such as boost.
    More portable libraries for GUI development (if that's your thing).
    Platform specific libraries (if you have to).

    The first two you need to be pretty good at, they form the foundation of everything else.
    As for learning specific libraries, you just need to know about them (and where to get reference information).


    Compilers and IDE's change far too rapidly, there's a new version of most of them at least once a year or so.
    Once you've experienced a few, you'll soon see a lot of "same" or "similar" between them.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  2. #17
    Registered User
    Join Date
    Mar 2010
    Posts
    583
    Where'd you get void main() from? I guess this is something you've been taught. While the Borland compiler does permit it, I suggest you unlearn it and use "int main(void)" always.
    I don't think your use of void was due to the age of the compiler you were using: Borland should (must) have supported int main(void) too. So your C++ knowledge may not be 'out of date', you just might have some Borland specificness to unlearn.

    Just a couple of MSVC pointers:
    Building stuff in MSVC is easy: the quickest way to sanity check the compiler with a hello world program is to create a win32 console application, empty, no precompiled headers. Then add source file and use the menu to build. You don't need to sort out any additional include paths or libraries for 'hello world'.

    Precompiled headers are a compile-time optimisation -- as in with them enabled it should take less time to build. However for small projects there's no noticeable difference, and it saves a layer of complexity. If you move onto GUI programming you might want to enable them for that as it'll make a bigger difference.

    You wrote:
    Not possible.
    iostream.h , conio.h , stdio.h are header files in C++ , and the very basic which govern input and output.
    MSVC definitely doesn't have iostream.h. C++ should use #include <iostream> (notes lack of .h).

  3. #18
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by Arpan Das View Post
    Where can I learn modern C++?
    Bjarne Stroustrup, the guy who invented C++ for AT&T decades ago and has been involved with its development ever since, put out a book a few years ago intended to teach beginners called Programming: Principles and Practice Using C++. I had it out from the library for a while and it is certainly very exhaustive and up to date. I'm sure it would make a great reference, and it is structured in chapters to teach you from the ground up. Just don't count on carrying it around too much unless you are in good shape, lol, and beware Bjarne's ego.

    Cplusplus.com has a lot of reference material, tutorials, etc, and is kept up to date, I think:

    cplusplus.com - The C++ Resources Network

    I actually mirrored the whole reference section to disk. The forum is better here tho.
    Last edited by MK27; 06-25-2011 at 12:50 PM.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  4. #19
    Registered User
    Join Date
    Dec 2007
    Posts
    2,675
    Where'd you get void main() from? I guess this is something you've been taught. While the Borland compiler does permit it, I suggest you unlearn it and use "int main(void)" always.
    The blame for this doesn't entirely lay at Borland's feet. MSVC++ will also happily allow you to use void main() as a prototype, although under the covers it converts it to int main().

  5. #20
    Registered User
    Join Date
    Jun 2011
    Posts
    14
    The C++ I learnt was taught to me in high school and the same practice is being done in college. But I want to learn the right thing. And thanks a lot guys , appreciate the patience with which you reply to n00bs

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. starting with C?
    By kk01 in forum C Programming
    Replies: 20
    Last Post: 01-01-2008, 07:03 AM
  2. Starting c#?
    By psyadam in forum C# Programming
    Replies: 4
    Last Post: 04-17-2007, 02:21 AM
  3. just starting out
    By jacquifish in forum C Programming
    Replies: 2
    Last Post: 03-27-2003, 08:35 AM
  4. Starting out
    By Chris2k in forum Game Programming
    Replies: 5
    Last Post: 11-23-2002, 06:20 PM
  5. just starting
    By Moffesto in forum C++ Programming
    Replies: 8
    Last Post: 06-19-2002, 03:15 PM