Thread: Code will not compile - code from a book!

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User Chubz's Avatar
    Join Date
    Sep 2004
    Posts
    16

    Code will not compile - code from a book!

    Ok, I am using Bloodshed-Dev C++ to compile (I just started learning this C++ stuff) and with this book that I recently bought, "C++ In Plain English", the code:

    EDIT - NOW WITH "CODE TAGS"
    EDIT 2 - NOW I GOT IT RIGHT!

    Code:
    #include <stdio.h>
    void main () {
            printf("Can you C++ now?");
    {

    does NOT want to compile

    What is wrong!? The other weird thing is that from the book reviews from Amazon.com, most were positive and even the negative ones never mentioned the code examples in the book not compiling correctly.

    This is horrible - what is going on here!!??
    Last edited by Chubz; 09-11-2004 at 09:31 PM. Reason: Added CodeTags

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Can you compile the following template function code?
    By George2 in forum C++ Programming
    Replies: 8
    Last Post: 03-06-2008, 08:16 PM
  2. Compile time of C versus C++ code
    By circuitbreaker in forum C++ Programming
    Replies: 20
    Last Post: 02-06-2008, 06:26 PM
  3. why the code can compile -- about function pointer
    By George2 in forum C++ Programming
    Replies: 3
    Last Post: 01-20-2008, 03:25 AM
  4. Trying to Compile a Dhrystone C Code program
    By JAYMAN in forum Linux Programming
    Replies: 3
    Last Post: 01-28-2006, 11:17 AM
  5. prime numbers code compile error
    By Tony654321 in forum C Programming
    Replies: 5
    Last Post: 10-10-2004, 10:13 AM