Hi everybody,
I'm a beginner trying to write a simple program to transpose a matrix, using CodeBlocks.
I keep getting build errors, such as "expected identifier before numeric constant" and "expected ',' or '---' before numeric constant" for line 5 (#define WIDTH 2).
I have no idea what it means. Yes, I have gone through the tutorials and searched online.
Any help would be greatly appreciated.
Also to make your life easier and not use preprocessor directives, which may or may not create a whole bunch of bugs depending on how complicated your program is, I would just use const, such that you define your WIDTH and LENGTH as:
1 2
constint WIDTH = 2;
constint LENGTH = 3;
These consts will usually go above your main since you'll want them to be global scope.