Thread: I need help on file size.

  1. #1
    Registered User
    Join Date
    Jun 2004
    Posts
    5

    I need help on file size.

    Hello I have a problem I just made a hang man game in for dos using c++ yet when i sent it to a friend and it was about 500kb in size and I think that its quite excessive for a game that only has 150 lines of code so plz some one tell me the reason for this. And ill attack the source code if that would help.

  2. #2
    Banned
    Join Date
    May 2004
    Posts
    129
    Explore some of the settings that are available for your compiler. Typically if you change modes, i.e from debug to release, the output binary is smaller. I've worked on a project with over 100K lines, and the total binary output didn't cap 5MB, so your are correct that proportionally your output is quite large.

  3. #3
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    I'll bet even money your compiler is including debugging symbols in the code

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Mmm, compiles to 17K in "release" mode when compiled for Linux using gcc.
    Gotta be a debug build...
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. To find the memory leaks without using any tools
    By asadullah in forum C Programming
    Replies: 2
    Last Post: 05-12-2008, 07:54 AM
  2. Formatting the contents of a text file
    By dagorsul in forum C++ Programming
    Replies: 2
    Last Post: 04-29-2008, 12:36 PM
  3. Replies: 16
    Last Post: 11-23-2007, 01:48 PM
  4. help with text input
    By Alphawaves in forum C Programming
    Replies: 8
    Last Post: 04-08-2007, 04:54 PM
  5. archive format
    By Nor in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 08-05-2003, 07:01 PM