Files
codeql/cpp/ql/test/library-tests/functions/functions/functions.cpp
Geoffrey White e4bbfb9a79 CPP: Corrections.
2019-08-13 11:25:39 +01:00

42 lines
475 B
C++

void f(int a, int b) {
bool c = a==b;
}
void g();
struct A {
void af() {
}
void ag();
};
void g() {
A a;
a.ag();
}
class Name {
const char* s;
};
class Table {
Name* p;
int sz;
public:
Table(int s=15) { p = new Name[sz=s]; } // constructor
~Table() { delete[] p; }
Name* lookup (const char*);
bool insert(Name*);
};
class MyClass
{
public:
MyClass();
MyClass(int from);
MyClass(const MyClass &from);
MyClass(MyClass &&from);
operator int();
};