Thread: umm can someone help

  1. #1
    Registered User
    Join Date
    Dec 2001
    Posts
    227

    umm can someone help

    i keep getting an errer that says "c:\mydocu~1\bomb.c
    parse error before `{'" on this cource--->

    #include <stdio.h>

    void dropbomb(void);

    int main()
    {

    printf("press any key to dropbomb:");
    getchar();
    dropbomb();
    printf("yikes\n");

    }

    void drompbomb();

    int x;

    {
    for(x=0;x>15;x++)
    {
    printf("\nweee");

    }
    }

    can anyone tell me what am i doing wrong? thanx

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    You've got two prototypes - the 2nd one should be a function
    Code:
    void drompbomb() {
      int x;
      for(x=0;x<15;x++) // was >
      {
        printf("\nweee");
      }
    }

  3. #3
    Registered User
    Join Date
    Dec 2001
    Posts
    227

    Angry

    i did it the same way you told me to do it and im still getting an errer. i sure you can bare with me cause it's my first time. thanx just in case ------>

    #include <stdio.h>

    void dropbomb(void);

    int main() {

    printf("press any key to dropbomb:");
    getchar();
    dropbomb();
    printf("yikes\n");
    }
    int drompbomb();{

    int x;
    for(x=0;x>15;x++)

    {
    printf("\nweee");

    }
    }

    now here is the errer again just in case "c:\mydocu~1\bomb.c
    parse error before `{'

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    > int drompbomb();{
    See that ; ?
    See it in mine ?

    And you've still got the >

  5. #5
    Registered User
    Join Date
    Dec 2001
    Posts
    227
    ohh thanx i got it

  6. #6
    Registered User
    Join Date
    Dec 2001
    Posts
    227

    Angry

    errr damn i got it but i dont hear the sound and i dont want to keep on bothering

  7. #7
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    Unless I am missing something....there's no code to create sound in there

  8. #8
    Registered User
    Join Date
    Aug 2001
    Posts
    247
    Unless I am mistaken, the only sound available to you is the bell
    The method of use for which is
    Code:
    for(i = 0; i < 15; i ++)
       printf("phwee\a\a\a\a");
    notice the inclusion of " \a " which is the symbol for the bell.
    hoping to be certified (programming in c)
    here's the news - I'm officially certified.

  9. #9
    Registered User
    Join Date
    Dec 2001
    Posts
    227
    well never mind i think im going to take a brake cause i have been at this all day. thanx all

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. umm were do i go next?
    By l33t in forum C Programming
    Replies: 6
    Last Post: 08-16-2007, 04:34 AM
  2. umm...grilled cheese is worth more than we thought
    By RoD in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 11-21-2004, 10:50 AM
  3. Umm, how do I tab over a whole bunch of code?
    By funkydude9 in forum C++ Programming
    Replies: 1
    Last Post: 12-23-2002, 11:11 AM
  4. Umm... OpenGL & Dev?
    By The Stupid One in forum Game Programming
    Replies: 7
    Last Post: 02-26-2002, 12:25 PM
  5. Umm...¿?
    By -KEN- in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 12-27-2001, 12:20 PM