View Single Post
Old Feb 20th, 2005, 12:04 PM   #1
ian
Newbie
 
Join Date: Feb 2005
Location: Singapore
Posts: 13
Rep Power: 0 ian is on a distinguished road
Newbie Question: C++ .EXEs.

Everybody starts off as a newbie, don't they? Okay, I'm new to C++ (syntax is somewhat familiar, due to my experiences in Java and some other languages) and desperate to get the hang of it because I'm going on a competition in 5 days time * .

Now, I need to ask is there anyway, I can reduce the size of C++'s .EXEs? Let me explain, the competition allows only a single diskette (that's 1.38 Mb) for participants to submit six EXE programs. The problem comes in when I import libraries.

For example, all of the programs would definitely need to do some basic file IO (open, read, close, create, write, close, in that order). So when I include fstream, the EXE size will increase approximately by 120 Kb. Assuming that each program is 200 Kb, it'll fit nicely into the diskette.

The whole thing that's bothering me is this: what if I'd need to import another library? I won't have an clues on what the tasks I'm supposed to do until the actual day of competition itself.

So I'd need anyone who's experience in C++ to help me out a little, is there anyway I can reduce the size of the EXEs? Or is there a workaround so the file size won't be as big.

The compiler I will be using is DJGPP (latest version; I downloaded it for the sake of the competition 2 days ago).

Thanks for any help you'd give.

* Just in case you're interested, I wasn't supposed to go for this competition because I lacked knowledge in C++ and Pascal (if they accepted Java, I wouldn't have worries already). My teacher-in-charge, however, submitted my name and told me that she did 8 days before the competition. So I'm kind of in a panic and desperate state now.
ian is offline   Reply With Quote