Hello.
I'm pretty new to programming, beginner at best.
I have made a bunch of small console programs in C++ with Dev-C++ and I was wondering why a 20 line program can end up being 400kb or more, and how I can make them smaller.
Hello.
I'm pretty new to programming, beginner at best.
I have made a bunch of small console programs in C++ with Dev-C++ and I was wondering why a 20 line program can end up being 400kb or more, and how I can make them smaller.
wow!
maybe because its set to debug, i use VC++ .NEt
but before that i used Dev-C++
try that its free and its very good!
EDIT:
lol i didn't really read you post
sorry i guess downlaod Visual C++ Beta 1 2005 its free and it makes executables very small...
Last edited by mrafcho001; 03-20-2005 at 02:06 PM.
Very helpful.
I turned on a setting called 'Strip executable' which cut the size in half. (still rather large)
So is it just Dev-C++ that does that to the executable? Maybe I should try another compiler?
Try Visual C++ Beta 1 2005
a program compiled by Dev-C++ is about 308kb, same compiled with Visual C++ Beta 1 2005 is about 266kb
You have no idea what you're talking about. A single test program, with default options, does not give any useful statistics. A compiler is so multifaceted that good statistics are very hard to come buy.Originally Posted by mrafcho001
Kenoli, I would suggest sticking with Dev-C++, I've found it much easier to configure and use (except for when you get to debugging).
Hope this helps.
*** TITANIC has quit (Excess Flood)
i would still stick with VC++.
It organizes my code as i type it and i find it easier to use except for that you can't compile .cpp files without a project.
im suspecting you're actually trying to make a backdoor....... ive been busy with them myself......and usually its very hard to make it undetectable by AVs unless u make it very small....who cares if the program is 400 kb or 200 kb or 300 kb...thats nothing....anyway shame yourself if ure tryin that. if not im sorry i judged you wrong
>>who cares if the program is 400 kb or 200 kb or 300 kb...thats nothing....
Anybody who's working on platforms that have limited memory. And it's a reasonable question to ask; back in the days of DOS games, something larger than 1mb would be a monster. 400kb is half a monster, for just 20 lines of code.
Just Google It. √
(\ /)
( . .)
c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.
I doubt his platform has limited memory in specially if hes busy with programming............still...............i only said what im suspecting
Well it's quite clear where you stand, that's for sure.
> im suspecting you're actually trying to make a backdoor....... ive been busy with them myself
Give it up now - no one's going to help you with that attitude to programming.
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.
If he's making a back door, stop ..........ing about your suspicions and work on preventing this back door from happening in the first place.
There are the hackers, and there are the people who stop them, plain and simple. Both of them will always exist, both of them shouldn't stop existing since that's what keeps everything in motion: A balance between the hackers and the security professionals.
Instead of suspecting his motives, realize your own and play your position. You can give him advice on programming and play your position at the same time. Not giving him advice means he'll A) Get that advice from someone else, and B) You won't know anything about what you'de like to stop.
Just so you know, mobile devices among other things are the most restricted devices you'll ever program with besides old computers / even older mainframes. His question was extremely valuable, not only to him, but to many people faced with the same problem.
Good optimizations you might consider are bit fields, and making all the functions you're using manually hehe (of course, this is pretty extreme but I'm sure you see the use in it).
OS: Windows XP Pro CE
IDE: VS .NET 2002
Preferred Language: C++.