I need help on file size.

This is a discussion on I need help on file size. within the Game Programming forums, part of the General Programming Boards category; Hello I have a problem I just made a hang man game in for dos using c++ yet when i ...

  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.
    Attached Files Attached Files

  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
    32,824
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

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, 08:54 AM
  2. Formatting the contents of a text file
    By dagorsul in forum C++ Programming
    Replies: 2
    Last Post: 04-29-2008, 01: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, 05:54 PM
  5. archive format
    By Nor in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 08-05-2003, 08:01 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21