Jump to content

ned help in C


theguy0000
 Share

Recommended Posts

I am using Dev-C++

im getting a bunch of errors about this script

#include <stdio.h>

int main(int argc, char **argv)
int count;
puts("Please enter a number: ");
scanf("%d", &count);
printf("The number is %d",count);
return (0)
}

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Link to comment
Share on other sites

expected init-declarator before "int"

expected "," or ";" before "int"

expected constructer, destructer, or type conversion before '(' token

expected "," or ";" before '(' token

<repeats taken out>

expected unqualified-id before "return"

edit: i looked at your code, i forgot the semicolons :"> its fixed now

Edited by theguy0000

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Link to comment
Share on other sites

I am using Dev-C++

im getting a bunch of errors about this script

#include <stdio.h>

int main(int argc, char **argv)
int count;
puts("Please enter a number: ");
scanf("%d", &count);
printf("The number is %d",count);
return (0)
}

<{POST_SNAPBACK}>

You appear to be missing an opening brace after the function declaration line. A semi-colon is needed at the end of each line, including the return statement. For readablilty, add a blank line between your variable declarations and the rest of your function code. Look at Larry's edit of your code.

David Nuttall
Nuttall Computer Consulting

An Aquarius born during the Age of Aquarius

AutoIt allows me to re-invent the wheel so much faster.

I'm off to write a wizard, a wonderful wizard of odd...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...