I'm going to pull my hair out!! I don't know what they hell is wrong with this simple program! I can't compile it, cuz it gives me the error: "Line 18, missing terminating ' character"
Code:
#include <stdio.h>
#define POSITIVE '\'
#define NEGATIVE 32
#define COLUMN_WIDTH 40
#define MAXLINES 100000
main()
{
int c; /* character count */
int l; /* line count */
int p=0; /* positive value */
for (l=1; l<=MAXLINES; ++l) {
++p; /* EQUATION */
for (c=1; c!=p; ++c) {
putchar(NEGATIVE);
if (c > COLUMN_WIDTH) {
c = COLUMN_WIDTH - c;
}
}
putchar(POSITIVE);
putchar('\n');
}
}
Line 18 is
Code:
if (c > COLUMN_WIDTH) {
I have no idea what's wrong, and it's driving me crazy.
Anyone have ideas?