Giter Club home page Giter Club logo

declarations-definitions-2018-06-12-denesnori's Introduction

Definitions and Declarations

This task is designed to teach you how to create definitions and separate them from declarations.

Task

Within this project, currently everything is defined within main.cpp - whilst this is OK for a tiny app, we're going to pretend that this is much larger since in those cases, you then want to separate your code into multiple files and you have to do that by having shared declarations and self-contained definitions.

After all, who wouldn't lose their sanity if an entire 100,000 line code base was in a single file?

Instructions

  1. Compile the program as-is and see it working for yourself.
  2. Move the first 2 functions (not main!) into utility.cpp - try to compile, note the relationship between compiler errors and individual source files.
  3. Fix the errors in utility.cpp (hint: it's something to do with missing #include statements)
  4. Create declarations (NOT definitions) in utility.h that correspond to the definitions in utility.cpp (no, don't just copy-paste the entire functions)
  5. Try to compile and run it. If you did it right, you should be able to try out the program.
  6. Submit it to the GitHub Classroom assignment.

declarations-definitions-2018-06-12-denesnori's People

Contributors

olipro avatar denesnori avatar

Watchers

Phil Nash avatar James Cloos avatar  avatar Tristan Brindle 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.