Jump to content
Sign in to follow this  
theguy0000

ned help in C

Recommended Posts

theguy0000

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

Share this post


Link to post
Share on other sites
theguy0000

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

Share this post


Link to post
Share on other sites
Nutster

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...

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.