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)

Recommended Answers

All 2 Replies

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

commented: that's like almost psychic :icon_eek: +5

got it thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.