What do I tell him?

He sent me this:
http://paste.pocoo.org/show/Aszwbq5CQ1oO6ZkIikGm/
My eyes are bleeding...
Last edited on
L B wrote:
My eyes are bleeding...


I think saying just that will suffice. :P

Or, you can walk him through everything that is wrong with that.
Wat.
Tell him Catfish from cplusplus.com supports his ways.
He's a C99 programmer and he's using the preprocessor the way nature intended. Get over it.
This isn't valid C of any kind

Consider the result of the preprocessor pass, the first if-clause becomes

1
2
3
4
if(NearestSize == 1)
{
 unsigned char [NumPackets]; Debug("Performing %i increments.", NumPackets); for(unsigned unsigned char v = 0; v < NumPackets; ++v) { unsigned char [v] = v; }
}


or, after formatting,

1
2
3
4
5
6
7
8
9
if(NearestSize == 1)
{
    unsigned char [NumPackets]; // error
    Debug("Performing %i increments.", NumPackets);
    for(unsigned unsigned char v = 0; v < NumPackets; ++v)  // error
    {
         unsigned char [v] = v; // error
    }
}

Last edited on
Catfish, this is why my eyes were bleeding - the obvious syntax errors.

This was his previous attempt:
http://paste.pocoo.org/show/Tzjmeo9pevxeqbtPsU1d/

It took me half an hour to explain to him why he should have used < and not >
Last edited on
Topic archived. No new replies allowed.