Preview

C++ Notes

Good Essays
Open Document
Open Document
14968 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
C++ Notes
Getting Set Up - C++ Compilers
The very first thing you need to do, before starting out in C++, is to make sure that you have a compiler. What is a compiler, you ask? A compiler turns the program that you write into an executable that your computer can actually understand and run. If you're taking a course, you probably have one provided through your school. If you're starting out on your own, your best bet is to use Code::Blocks with MinGW. If you're on Linux, you can use g++, and if you're on Mac OS X, you can use XCode. (If you are stuck using an older compiler, such as Turbo C++, you'll need to read this page on compatibility issues.) If you haven't yet done so, go ahead and get a compiler set up--you'll need it for the rest of the tutorial.
Intro to the C++ Language
A C++ program is a collection of commands, which tell the computer to do "something". This collection of commands is usually called C++ source code, source code or just code. Commands are either "functions" or "keywords". Keywords are a basic building block of the language, while functions are, in fact, usually written in terms of simpler functions--you'll see this in our very first program, below. (Confused? Think of it a bit like an outline for a book; the outline might show every chapter in the book; each chapter might have its own outline, composed of sections. Each section might have its own outline, or it might have all of the details written up.) Thankfully, C++ provides a great many common functions and keywords that you canuse.

But how does a program actually start? Every program in C++ has one function, always named main, that is always called when your program first executes. From main, you can also call other functions whether they are written by us or, as mentioned earlier, provided by the compiler.

So how do you get access to those prewritten functions? To access those standard functions that comes with the compiler, you include a header with the #include directive. What

You May Also Find These Documents Helpful

  • Satisfactory Essays

    1980 C++ was invented at bell laboratories the cool thing about c++ is it has low lever and high level machine languages.…

    • 388 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    PT1420week5exdkinney

    • 404 Words
    • 2 Pages

    References: Gaddis, T. (2010). Starting out with programming logic & design. Boston, MA: Addison- Wesley/Pearson Education, Inc.…

    • 404 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Homework Week 2

    • 743 Words
    • 3 Pages

    2. What does a compiler do? What kinds of errors are reported by a compiler?…

    • 743 Words
    • 3 Pages
    Satisfactory Essays
  • Powerful Essays

    Pt1420 Unit 1 Assignment 2

    • 1305 Words
    • 6 Pages

    Das, D., Gregersen, E., Hosch, L., Lotha, G., Sampaolo, M., Sinha, S. (2014). C++. In Encyclopedia Britannica.…

    • 1305 Words
    • 6 Pages
    Powerful Essays
  • Good Essays

    pt1420 exam review

    • 738 Words
    • 3 Pages

    The words that make up a high level programming language are known as what? Keywords…

    • 738 Words
    • 3 Pages
    Good Essays
  • Powerful Essays

    EAS230Syllabus

    • 1748 Words
    • 8 Pages

    C++ programming: editing, compiling, user I/O, variables (ints, doubles, char, strings, booleans), loops, decisions, functions, pointers, arrays, tables, databases, sorting.…

    • 1748 Words
    • 8 Pages
    Powerful Essays
  • Better Essays

    Notes

    • 2294 Words
    • 10 Pages

    In 2006, the NSW Government passed the Crimes Legislation Amendment (Gangs) Act 2006, making it the first Australian jurisdiction to legislate specific offences against criminal organisations (Schloenhardt 2008). The provisions make it an offence to participate in a criminal group, defined as three or more people who have as their objectives either to obtain material benefits from serious indictable offences or to commit serious violent offences. The Act also created power for the court to make a fortification removal order, in order to deal with OMCGs' heavily fortified premises.…

    • 2294 Words
    • 10 Pages
    Better Essays
  • Satisfactory Essays

    Notes

    • 466 Words
    • 2 Pages

    ·Himalayan Mountains- Mountain range in south Asia that contains Mt. Everest ( worlds tallest peak).…

    • 466 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Notes

    • 1570 Words
    • 7 Pages

    Celia was the name of a young female slave, who came to work for a prominent Missouri family called the Newsoms. Robert Newsom, a plantation owner in Callaway, Missouri, purchased her at age 14. Newsom was recently widowed and it seems he purchased Celia, looking for sex. He started raping her after being brought back to the farm. From then on, Newsom "visited" Celia often in a cabin he provided for her which was very close to the main household. Over the years, Celia had two children with Newsom, which he also considered "his property". The interesting thing about Celia’s story is that it recounts a tale of social strife and clearly indicates the fact that slaves were playing with a heavily stacked deck in relation to their Caucasian opposites.…

    • 1570 Words
    • 7 Pages
    Good Essays
  • Satisfactory Essays

    Notes

    • 910 Words
    • 4 Pages

    Sacraments call our attention to and remind us of a reality of god that is always present, but se may not always realize.…

    • 910 Words
    • 4 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Notes

    • 295 Words
    • 2 Pages

    How do clinical psychologists help their patients with mental illness?: They help them solve their problems by changing harmful or ineffective behaviors.…

    • 295 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Notes

    • 2090 Words
    • 9 Pages

    Learning Objectives: Students should be able to ... • Define evolution, fitness, and adaptation using the biological definitions. • Describe the nature of the evidence regarding (1) whether species change through time and (2) whether they are related by common ancestry. • Assess whether Darwin's four postulates are true in any given example, explain to a friend why evolution must occur if all four are true, and explain whether evolution will occur if any of the four are not true. • Identify common misconceptions about evolution, and give examples to illustrate why they are not true. (For example: Is evolution progressive? Do animals do things "for the good of the species"? Does evolution result in perfection?) Lecture Outline • Evolution is one of the best-supported and most important theories in the history of science. • Evolution is one of the five attributes of life. • Evolution has both a pattern and a process. I. The Evolution of Evolutionary Thought A. Plato and typological thinking 1. Plato saw species as unchanging, perfect "types" created by God. 2. Plato thought individual variation was an unimportant deviation from the true "type." B. Aristotle and the great chain of being (scale of nature) 1. Aristotle, like Plato, thought species were unchanging types. 2. Aristotle thought species could be organized into a sequence or ladder of increasing complexity, with humans at the top. (Fig. 24.1) C. Lamarck and the idea of evolution as change through time 1. Lamarck noticed that organisms changed over time. 2. Lamarck thought animals progressed over time from "lower" to "higher" forms (like Aristotle's ladder) via inheritance of acquired characteristics. D. Darwin and Wallace and evolution by natural selection 1. Species change over time, but they do not "progress." 2. A species does not have a single true "type." 3. Individual variation is important; variation is what drives…

    • 2090 Words
    • 9 Pages
    Good Essays
  • Satisfactory Essays

    Hospital and Square Feet

    • 389 Words
    • 2 Pages

    “Indeed, Allah will not change the condition of a people until they change what is in themselves.” (Al-Quran 13:11)…

    • 389 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    notes

    • 1334 Words
    • 6 Pages

    Graduat nurses should feel the responsibility mentoring and coaching should be a core competeant of core competent are . Coaching and mentoring are the foundation of prociding quality competent nurses, particularly at a graduate level. Mentoring coachin illicits effective decision making, collaborative administration of care and a relationship of trust. With those who are being mentored/coached. As a graduate level nurse mentoring/coaching are elements that are essential to mentoring issues and --------thins that need to be changed. Mentors/coaches monitor competancies building of the desires of a leader/coach encouraging and empowering individuals being coached to succeed in the task(s) at hand. Mentors/coaches helps to develop the skills that are required to handle a variety of situations. As indicated in the text------------“ Coaches and mentor’s are the key to the development of leaders of tomorrow and such tools could meet the acknowledged training and developmental needs of nurses, while expanding the role of senior management and their links with those who deliver patient services. As indicated in the text APN’s skill in expert coaching and guidiance will be central to efforts to redesign and transform healthcare system to become more patient-centered.The text goes on to say that teaching and coaching are recognized as core competiencies of APN’S…

    • 1334 Words
    • 6 Pages
    Satisfactory Essays
  • Good Essays

    notes

    • 491 Words
    • 2 Pages

    directors, which is headed by Karl Hansen, the son of the founder of the company.…

    • 491 Words
    • 2 Pages
    Good Essays

Related Topics