Skip to content

TeachingOW/CPP

Repository files navigation

C++ Spring 2025

Important Links:

Assignements:

Week 1

Introduction to C++

  • C++ is similar in syntax to Java
  • Review Java syntax
  • C/C++ is not an inherently objected oriented language

Hello world in C++

#include<iostream> // Needed for input and output

using namespace std; // Standard library of C++

int main(){  //program entry point
    
    cout << "Hello World"<<endl;
    return 0;
}

Week 2

Function declaration vs function definition

  • Prime number Code
  • Write prime numbers to a text file Code
  • Solve GCD Problem Description
  • use Files File
  • Tic Tac Toe

Week 3

  • Call by reference and by value
  • vector
    • size(), constructor, [], push_back
  • Random number
    • rand(), RAND_MAX
    • simulate dice
    • estimate $\pi$1.
  • arguments in programs i.e., argc, argv
  • work with bitmap images header,test code

Week 4

Week 5

Week 6

  • Classes tutorial

  • Multiple files (project across multiple files) cat

  • virtual methods

  • Scott Meyers, in Effective C++, provides a useful guideline:

    if a class has any virtual function, it should have a virtual destructor, and that classes not designed to be base classes or not designed to be used polymorphically should not declare virtual destructors.

  • Classes II tutorial

  • Midterm Review review

  • Questions from midterm:

Week 7

Week 8

  • worked on complex numbers

Week 9

Week 10

Week 12

  • vector implementations

Week 13

Week 15

  • Revision
  • Histogram code
  • Bit Vector code

Next Topics:

  • lambda

Footnotes

  1. There are other forumlas to compute $\pi$, such as $\pi = 4 \times \sum_{n=0}^{\infty} \frac{(-1)^n}{2n + 1}$

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •