Department of Engineering

IT Services

C++

wordle C++ is the object-oriented development of C with classes, member functions, operator overloading, constructors etc. It's the first language taught to undergraduates at CUED.

Starting C++

Local teaching

General Reference

Tutorials

Special topics

Advanced WWW resources

General

Maths 

Pointers

Programming

Other Topics

Local Information

General

Special topics

Types

Variables

Classes

Generic programming

Performance

Misc

Compilers and libraries

We have various IDEs (Integrated Development Environments) providing easy access to the compiler (which is g++ on the linux machines). Geany is used in the 1st year course. If you want to work away from CUED see

To use C++2011 on the central linux system, type

g++5 --std=c++11

With that version, the following should compile

#include <iostream>
#include <string>
#include <regex>

int main()
{
    std::string str("1231");
    std::regex r("^(\\d)\\d"); // entire match will be 2 numbers
    std::smatch m;
    std::regex_search(str, m, r);
    for(auto v: m) std::cout << v << std::endl;
}

When run, it should produce this output

12
1

Integrated Development Environments

An Integrated Development Environment (IDE) offers integrated editing, compiling, debugging and project-management facilities. On the teaching system we currently have Anjuta (version 1) , Geany , NetBeans (with a C++ add-on), Eclipse and codeblocks

Anjuta
Anjuta 1. Click to zoom in

Geany. Click to zoom in
Netbeans
Netbeans. Click to zoom in
eclipse
Eclipse. Click to zoom in
eclipse
Codeblocks. Click to zoom in

FAQ