Thread: cannot put an int here???

  1. #1
    Registered User
    Join Date
    Feb 2003
    Posts
    12

    cannot put an int here???

    Hi, ive just designed this program with the print_header,. then i try and put an int in the code and it doesnt compile, ive tried various variations, can someone show me where i can put the

    int num1

    in the code

    ------------CODE----------------

    #include <stdio.h>


    int main()

    int num1
    {

    void print_header()
    {
    printf("Program Number 1\n");
    printf("by Marshall Brain\n");
    printf("Version 1.0, released 12/26/91\n");
    }

    print_header();

    }

    ---------------CODE-------------------


    thanks greg

  2. #2
    Registered User
    Join Date
    Feb 2003
    Posts
    12

    FIXED I FORGOT THE ; SORRY!!!!

    FIXED! Close thread

  3. #3
    Registered User
    Join Date
    Jan 2003
    Posts
    115
    i think your code reads a little clumsily.
    it should go along the lines of this ... (dont forget code tags)
    what are you trying to do with num1 ?
    Code:
    #include <stdio.h>
    
    void print_header();
    
    int main()
    {
    
    print_header();
    return 0;
    
    }
    
    void print_header()
    {
    printf("Program Number 1\n");
    printf("by Marshall Brain\n");
    printf("Version 1.0, released 12/26/91\n");
    }
    there are only 10 people in the world, those who know binary and those who dont

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 48
    Last Post: 09-26-2008, 03:45 AM
  2. Replies: 3
    Last Post: 05-13-2007, 08:55 AM
  3. Working with random like dice
    By SebastionV3 in forum C++ Programming
    Replies: 10
    Last Post: 05-26-2006, 09:16 PM
  4. Converted from Dev-C++ 4 to Dev-C++ 5
    By Wraithan in forum C++ Programming
    Replies: 8
    Last Post: 12-03-2005, 07:45 AM
  5. Replies: 4
    Last Post: 11-23-2003, 07:15 AM