A dump for all of my noob C codes, let see if I can code like a real Computer Science person! (Send Help)
NOTE: This was my actual Windows 10 (Administrator) setup
- Download CodeBlocks with MinGW setup.
- I downloaded CodeBlocks, but thought, I still prefer Notepad++ and Command Prompt
- Once downloaded, run and complete the setup.
- Add MinGW/bin to System PATH:
- Locate and copy the full path of
C:\...\CodeBlocks\MinGW\bin
- Search for "Edit the system environment variables" (under System Properties > Advanced)
- Click the Environment Variables... button
- Under the System variables, edit Path
- Add MinGW/bin to Path
- Launch command prompt, then run
gcc -v
to verify if setup is OK. - Done, you can now start coding in C!
gcc <filename>.c -o <appname>
<appname>
- Create a new CMD/Batch file, e.g.
build.cmd
cls
setlocal ENABLEDELAYEDEXPANSION
set f=%1
set f=%f:.c=%
cls
gcc %f%.c -o %f%
%f%
- Add the Batch file's directory to Path (System variables)
- Launch Command Prompt application
- Locate your code directory
- Run command:
build <filename>
(without the .c)
- Codes might be too bookish and not simplified, teach me senpai!
- Some implementations are not yet optimized (or correct?), because author is still at beginner level.
- Some time complexity calculations may be wrong, but will be corrected as I learn how to do it properly.
- Other things might have been overlooked, I will work on that.