Question about Macintosh's Codewarrior

This is a discussion on Question about Macintosh's Codewarrior within the C++ Programming forums, part of the General Programming Boards category; Hi, I am just starting out in programming but Ive encountered problems with Mac OS X Codewarrior. Even if I ...

  1. #1
    Registered User
    Join Date
    Oct 2005
    Posts
    1

    Unhappy Question about Macintosh's Codewarrior

    Hi, I am just starting out in programming but Ive encountered problems with Mac OS X Codewarrior. Even if I write things verbatim from lessons on this website it gives me multiple error messages and therefore does not let me run my programs.

    For example I type this in:
    #include <stdio.h>

    int main()
    {
    int a, b, c;
    printf("Enter the first value:");
    scanf("%d", &a);
    printf("Enter the second value:");
    scanf("%d", &b);
    c = a + b;
    printf("%d + %d = %d\n", a, b, c);
    return 0;
    }

    and I get this:

    error: TRUE was not declared in this function
    error: 'Execute' was not declared in this sope
    error: expected ';' before 'all'
    error: expected '}' at end of output

    Can someone please help me out?

  2. #2
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,077
    First, this is in the wrong forum.
    ...but whatever.

    Personally, by the way your errors look I can't see how that's the only code you're compiling. Your error says "Expected ';' before 'all', but I see no all in the program. I'm not familiar with Mac's Codewarrior. Try downloading a different compiler and see if it compiles.
    Sent from my iPadŽ

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Question about pointers #2
    By maxhavoc in forum C++ Programming
    Replies: 28
    Last Post: 06-21-2004, 01:52 PM
  2. Question...
    By TechWins in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 07-28-2003, 10:47 PM
  3. opengl DC question
    By SAMSAM in forum Game Programming
    Replies: 6
    Last Post: 02-26-2003, 09:22 PM
  4. Question about linked lists.
    By cheeisme123 in forum C++ Programming
    Replies: 6
    Last Post: 02-25-2003, 01:36 PM
  5. Question, question!
    By oskilian in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 12-24-2001, 01:47 AM

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