Discussions
Explore the latest discussions related to this domain.
Catch-23: The New C Standard Sets the World on Fire
Main Post: Catch-23: The New C Standard Sets the World on Fire
Top Comment:
It likely won't matter until gcc and clang actually implement support. Speaking from C++ experience, the msvc, g++ and clang compilers all lack full conformance to the newest C++ ISO standard and often in different ways.
Though tbh I don't know how well/quick compilers conform to newest C standard
Should I learn C instead of C++ if 'exe' file sizes are important to me? Scared by the 3MB "Hello World.exe" file size made by C++ :(
Main Post:
I created a simple "Hello World" in C++ and the file size was enormous at 3 megabytes, this scared the shit out of me. I understand from reading up online that same Hello World in C would just be hardly a Kilo Byte tops.
Want to learn low level prog lang like C or C++ just so that i can create tiny 'exe' utilities (file reading/writing, simple network fetch checkers, etc) which i can simply share with anyone & they too would be able to use it. Been using Python for that sorta stuff but pyInstaller too creates huge "exe"s for tiny scripts & telling someone to install Python to use my script sux. Finally i went with C++ just because i have a few weeks of Codecademy Pro available & saw C++ on it but no C. :(
Should I switch from C++ to C if file footprint is important to me? Or as my programs grow in size, do they equalize whether made in C or C++? Thank youu!!
Edit - thank you everyone, highly appreciate your answers to this noob! I've gained some clarity and have decided to continue with C++ for now.
Top Comment:
C, 44.5 KB, compiled with -O3:
#include <stdio.h> int main(void){ printf("Hello world"); return 0; }C++, 45 KB, compiled with -O3:
#include <cstdio> int main(void){ std::printf("Hello world"); return 0; }