i can't post the whole thing, because part of it's an entry to the flashdaddee contest, but here's the important stuff...
Code:
#include <cstdio>
class bitstream {
private:
int length;
int bit_length;
unsigned char bitt[65536];
public:
bitstream (char *temp) {
//blah... temp doesn't get changed
}
int print() { }
};
int dummy(bitstream); //other problem area
int bit(int x,char y) {} //gets the value of a bit in a char, works fine
int dummy(bitstream x) {} //causes crash
int main()
{
char input[128];
int x=0;
fgets(input,128,stdin);
bitstream streamer(input); //works fine
dummy(streamer); //causes error
streamer.print(); //to print results
return 0;
}
when compiled, this piece of code crashes.