mirror of
https://github.com/github/codeql.git
synced 2025-12-22 11:46:32 +01:00
44 lines
508 B
C++
44 lines
508 B
C++
// Variable
|
|
|
|
extern int myVariable;
|
|
|
|
int myVariable = 10;
|
|
|
|
// Function, Parameter
|
|
|
|
void myFunction(int myParameter);
|
|
|
|
void myFunction(int myParameter)
|
|
{
|
|
// ...
|
|
}
|
|
|
|
// Enum (UserType)
|
|
|
|
enum myEnum : short;
|
|
|
|
enum myEnum : short
|
|
{
|
|
myEnumConst
|
|
};
|
|
|
|
// TemplateClass, TemplateParameter (UserType)
|
|
|
|
template <typename T>
|
|
class myTemplateClass
|
|
{
|
|
public:
|
|
T myMemberVariable;
|
|
};
|
|
|
|
myTemplateClass<int> mtc_int;
|
|
myTemplateClass<short> mtc_short;
|
|
|
|
// Class (UserType)
|
|
|
|
class myClass
|
|
{
|
|
public:
|
|
int myMemberVariable;
|
|
};
|