Giter VIP home page Giter VIP logo

cpp-module-00's Introduction

CPP-Module-00 | 42 Madrid

shhhhh... I think the students are asleep ๐Ÿ“ฃ

Table of Contents

Introduction

This is the first project we've ever done in C++. For this reason, things will start slow. In this first set of exercises we will learn about the basic syntax of C++, namespaces, classes, member functions, and several other new concepts. All in all, it's lots of basic stuff.

ex00. Megaphone

This first exercise is quite simple, we are asked to create a program that takes arguments and prints them back to the terminal in capital letters. If no arguments are provided the program will print out a default message, also in captial letters.

Example

ex01. My Awesome PhoneBook

This second exercise is a bit more fun. We have to simulate a phonebook with a terminal interactive UI. We can ADD or SEARCH for contacts, and we can also EXIT, clearing the list of contacts and ending the program. The phonebook can receive up to 8 contacts, such that the 9th contact will replace the 1st contact, the 10th will replace the 2nd, and so on.

Example

ex02. The Job Of Your Dreams

In this third and last exercise we are given two files which will help us build a class and all the necessary static and member functions so that the provided main function in tests.cpp creates the same output as the file 19920104_091532.log (save the different timestamps). Our job is to figure out what the functions do to create the appropriate file Account.cpp. We are also given the header file containing the class definition in Account.hpp.

Example

Installation

For this project and fututre C++ projects it is only required to have clang and/or gcc, which provide their respective compilers clang++ and g++. It is also recommended to install the valgrind package on Linux for debugging purposes. Every exercise (unless specified otherwise) includes its own Makefile with the necessary instructions. In some cases certain tweaks needed to be made to ensure the most similar results in both Linux and MacOS.

References

Summary

For a first module, it was mostly easy, except for ex02, which was a bit tricky to understand at first.

May 16th, 2022

cpp-module-00's People

Contributors

madebypixel02 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.