Author Topic: #define error in CodeBlocks  (Read 5101 times)

Offline PsychadelicGumballMachine

  • Multiple posting newcomer
  • *
  • Posts: 15
#define error in CodeBlocks
« on: September 07, 2023, 01:09:49 am »
I am not sure if this is an error with code blocks per se, but I believe it is.  I don't know what else it could be.  I am trying to define a constant with:
#define ARRAY_SIZE 5.  However upon attempting to compile, I got the error:
error: expected ';' , ',' or ')' before numeric constant.

I am not sure what that means and I did not used to get this kind of message when using #define in the past.  Anyone who can help me would be greatly appreciated.  This is being written in C if it matters.

Thank you in advance.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7682
    • My Best Post
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7682
    • My Best Post
Re: #define error in CodeBlocks
« Reply #2 on: September 08, 2023, 12:30:57 am »
If you really think it is a Code::Blocks problem post a full build log.
If you do not, then post your code and the full build log on a website that helps newbie coders.

Tim S.
« Last Edit: September 08, 2023, 06:37:23 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org