c-cpp-setup

C/C++ Programming Setup Guide

Welcome to your journey into C/C++ programming! This guide will help you set up everything you need to start writing, compiling, and running C/C++ programs on your computer.

Quick Start

New to programming? Follow these steps in order:

  1. Install a C/C++ compiler for your operating system
  2. Install VSCode as your code editor
  3. Write your first program
  4. Start learning C/C++ basics

Don’t worry if this seems overwhelming - we’ll guide you through each step!

What You’ll Need

Before starting, make sure you have:

Choose Your Operating System

Click on your operating system to get started:

Windows Users

-> Windows Setup Guide

Mac Users

-> macOS Setup Guide

Linux Users

-> Linux Setup Guide

Code Editor Setup

After installing your compiler, set up a great code editor:

-> VSCode Setup Guide

What Each Guide Covers

Compiler Installation Guides

Each OS-specific guide includes:

VSCode Guide Features

Quick Setup Path

For experienced users who want the essentials:

  1. Install compiler:
    • Windows: MinGW via installer
    • macOS: xcode-select --install
    • Linux: sudo apt install build-essential (Ubuntu) or sudo dnf groupinstall "Development Tools" (Fedora)
  2. Install VSCode:
    • Download from code.visualstudio.com
    • Install C/C++ extension by Microsoft
    • Install Code Runner extension by Jun Han
  3. Test with Hello World:
    #include <stdio.h>
    int main() {
        printf("Hello, World!\n");
        return 0;
    }
    

Getting Help

Common Issues

Most beginners run into these problems:

Where to Find Solutions

  1. Check the troubleshooting section in each guide
  2. Verify you followed all steps in the correct order
  3. Restart your computer after installation (fixes many PATH issues)
  4. Try the alternative methods mentioned in each guide

After Setup - What’s Next?

Once you have everything installed:

Immediate Next Steps

  1. Write a few simple programs to get comfortable
  2. Learn the compile-and-run process until it’s automatic
  3. Explore VSCode features like syntax highlighting and error detection
  4. Try both running methods (Terminal and Code Runner) to see which you prefer

Windows Graphics Programming

Version Control with Git

Learning Path

  1. C Basics: Variables, data types, input/output
  2. Control Flow: If statements, loops, functions
  3. Arrays and Strings: Working with collections of data
  4. Pointers: Understanding memory (the tricky but powerful part!)
  5. Structures: Organizing related data
  6. File I/O: Reading and writing files
  7. Graphics Programming: Create visual programs with graphics.h (Windows only)
  8. C++ Features: Classes, objects, and more (if you want to learn C++)

Practice Resources

Folder Structure

Here’s how this guide is organized:

.
├── README.md              ← You are here!
├── compiler/              ← Compiler setup guides
│   ├── macos.md           ← macOS setup guide  
│   ├── linux.md           ← Linux setup guide
│   └── windows.md         ← Windows setup guide
├── course/               ← Course-specific guides
│   └── graphics.md        ← Graphics library setup
├── ide/                   ← IDE setup instructions
│   └── vscode.md          ← VSCode editor setup
├── version-control/       ← Version control setup instructions
│   └── git.md             ← Git setup guide
└── resources/             ← Optional: Offline installers
    ├── windows/           ← Windows offline installers
    ├── graphics/          ← Graphics library files
    └── git/               ← Git offline installers
    

Pro Tips for Beginners

While Learning

Development Workflow

  1. Write code in VSCode
  2. Save the file with proper extension (.c or .cpp)
  3. Compile and run using your preferred method
  4. Fix any errors and repeat
  5. Test thoroughly with different inputs

Good Habits to Develop

Why This Setup?

We chose these tools because they’re:

Success Checklist

You’ll know your setup is complete when you can:


Ready to Start?

Choose your operating system above and begin your C/C++ programming journey!

Remember: Every expert programmer started exactly where you are now. Take it one step at a time, be patient with yourself, and don’t hesitate to revisit these guides whenever you need them.

Happy coding!


Windows Setup macOS Setup Linux Setup VSCode Setup Git Setup Graphics Setup