954,498 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

C Program Compiles in Dev-C++ but not GCC?

p1a.c: In function `main':
p1a.c:20: parse error before `char'
p1a.c:46: parse error before `char'
p1a.c:47: `result' undeclared (first use in this function)
p1a.c:47: (Each undeclared identifier is reported only once
p1a.c:47: for each function it appears in.)
p1a.c:47: `basechars' undeclared (first use in this function)

Kombat
Light Poster
39 posts since Sep 2009
Reputation Points: 10
Solved Threads: 0
 

Standard C doesn't allow you to declare variables in the middle of statement blocks.

Salem
Posting Sage
Team Colleague
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
 

got it thanks

Kombat
Light Poster
39 posts since Sep 2009
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You