From 42815c0bab8724dbaf054c7b51c68f3540b65b57 Mon Sep 17 00:00:00 2001 From: benn Date: Sat, 5 Apr 2025 12:30:41 +0200 Subject: [PATCH] Netbeans C/C++ generic project --- Makefile | 134 +++++++++++++++++ nbproject/configurations.xml | 96 +++++++++++++ .../CodeAssistancePathMapper.properties | 1 + nbproject/private/Default-build.log | 10 ++ nbproject/private/Default-exec.log | 7 + nbproject/private/Default.properties | 1 + .../private/c_standard_headers_indexer.c | 75 ++++++++++ nbproject/private/configurations.xml | 115 +++++++++++++++ .../private/cpp_standard_headers_indexer.cpp | 135 ++++++++++++++++++ nbproject/private/debug.properties | 1 + nbproject/private/launcher.properties | 42 ++++++ nbproject/private/private.xml | 17 +++ nbproject/project.xml | 30 ++++ src/myapp.cpp | 30 ++++ 14 files changed, 694 insertions(+) create mode 100755 Makefile create mode 100644 nbproject/configurations.xml create mode 100644 nbproject/private/CodeAssistancePathMapper.properties create mode 100644 nbproject/private/Default-build.log create mode 100644 nbproject/private/Default-exec.log create mode 100644 nbproject/private/Default.properties create mode 100644 nbproject/private/c_standard_headers_indexer.c create mode 100644 nbproject/private/configurations.xml create mode 100644 nbproject/private/cpp_standard_headers_indexer.cpp create mode 100644 nbproject/private/debug.properties create mode 100644 nbproject/private/launcher.properties create mode 100644 nbproject/private/private.xml create mode 100644 nbproject/project.xml create mode 100644 src/myapp.cpp diff --git a/Makefile b/Makefile new file mode 100755 index 0000000..a7a0661 --- /dev/null +++ b/Makefile @@ -0,0 +1,134 @@ +# Generic Makefile for NetBeans for C/C++ projects +# Copyright (C) 2025 Benny Lyons +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + +# +# Uses the variable NETBEANSBUILD which is added to _both_ the compile flags +# and the link process. Without this option Netbeans will not recognise the +# binary, so it is not possible to debug the binary in NetBeans. +# If you obtain the NetBeans error 'Not an ELF Binary', or something similar, +# then using $(NETBEANSBUILD) will most likely fix this. +# + + +# Change this to the name of your application, programme +# or the name of the binary this makefile produces +APP = myapp + +# C++ compiler +#CXX:=clang++ +CXX := g++ + + +# +# NETBEANSBUILD +# +# Netbeans does not recognise an executable to debug out of the box. +# You must instruct the compiler to produce Platform Independent Code by +# using -no-pie. PIE is required to use Address Space Layout Randomization +# (ASLR), which is a security feature, which Netbeans cannot currently use. +# +# To fix, add the following option to CFLAGS and LDFLAGS +# -no-pie +NETBEANSBUILD := -no-pie + +ifeq ($(MAKECMDGOALS),debug) + DBG_REL :=-ggdb3 +else + DBG_REL := +endif + +# +# OS dependent flags +# +OS := $(shell uname -s) +ifeq ($(UNAME_S),Linux) + DBG_REL += +endif +# OpenIndiana and flavours +ifeq ($(UNAME_S),SunOS) + DBG_REL += +endif + + + +# CPPCHECK = $(HOME)/devl/cppcheck/bin/cppcheck +CPPCHECK := cppcheck + +SRC_DIR := src +OBJ_DIR := obj +SRC := $(wildcard $(SRC_DIR)/*.cpp) + +OBJS := $(patsubst $(SRC_DIR)/%.cpp,$(OBJ_DIR)/%.o,$(SRC)) + +## +## Add checks and issue warnings +## +# -Wall -Wextra # turn on all warnings. +# -Wconversion -Wsign-conversio # warn on unsign/sign conversions. +# -Wformat-security # warn onformat functions that might be a security issue +# -Werror # deactivate this initially? convert all warnings into errors. +# -march=x86-64 # take max advantage of address space (important for ASLR; +# # more virtual address space to chose from when randomising layout). +# -fstack-protector-all # +# -Wstack-protector # +# --param ssp-buffer-size=4 # +# -ftrapv # generate traps for signed overflow (currently bugged in gcc) +# -D_FORTIFY_SOURCE=2 -O2 # buffer overflow check. -D_FORTIFY_SOURCE=1 also possible +# -Wfloat-equal # testing floating-point numbers for equality is usually bad +# -Wpointer-arith # warn if anything depends upon the size of a function or of void +_CXXFLAGS=-Wall -Wextra \ + -Wconversion -Wsign-conversion \ + -march=x86-64 \ + -Wformat-security \ + -fstack-protector-all -Wstack-protector --param ssp-buffer-size=4 \ + -ftrapv \ + -D_FORTIFY_SOURCE=2 -O2 \ + -Wfloat-equal \ + -Wpointer-arith + + +CXXFLAGS = $(NETBEANSBUILD) $(DBG_REL) $(_CXXFLAGS) +LIBS = $(NETBEANSBUILD) + +# Uncomment one of the following to select an output format +#CHECKFLAGS = --template="{file},{line},{severity},{id},{message}" +CHECKFLAGS = --quiet --enable=all --error-exitcode=1 +#CHECKFLAGS = --enable=all --error-exitcode=1 + +debug release: DIRS $(APP) +check: cppcheck.out + + +$(APP): $(OBJS) + $(CXX) -o bin/$@ $^ $(LIBS) +$(OBJ_DIR)/%.o: $(SRC_DIR)/%.cpp + $(CXX) $(CXXFLAGS) -o $@ -c $< + +DIRS: + mkdir -p ./obj ./bin + +cppcheck.out: $(SRC) + $(info output to cppcheck.out) + $(CPPCHECK) $(CHECKFLAGS) $^ > $@ 2>&1 + +.PHONY: clean +clean: + $(info cleaning up) + @rm -f $(APP) $(OBJ_DIR)/* ./bin/$(APP) cppcheck.out + @if [ -d "./bin" ]; then rmdir ./bin ; fi + @if [ -d "./obj" ]; then rmdir ./obj ; fi diff --git a/nbproject/configurations.xml b/nbproject/configurations.xml new file mode 100644 index 0000000..6c7ac5a --- /dev/null +++ b/nbproject/configurations.xml @@ -0,0 +1,96 @@ + + + + + + testptr.cpp + + + + Makefile + nbproject/private/launcher.properties + + + ^(nbproject)$ + + . + + Makefile + + + + default + false + false + + + + + + + + + . + ${MAKE} debug + ${MAKE} clean + bin/testptr + + + . + + + _FORTIFY_SOURCE=2 + + + + + . + + + + + + + + + + + default + false + false + + + + + + + + + . + ${MAKE} -f Makefile + ${MAKE} -f Makefile clean + bin/testptr + + + . + + + _FORTIFY_SOURCE=2 + + + + + . + + + + + + + + + + diff --git a/nbproject/private/CodeAssistancePathMapper.properties b/nbproject/private/CodeAssistancePathMapper.properties new file mode 100644 index 0000000..7f5ded8 --- /dev/null +++ b/nbproject/private/CodeAssistancePathMapper.properties @@ -0,0 +1 @@ +# Automatic path mapper. CRC = 1 diff --git a/nbproject/private/Default-build.log b/nbproject/private/Default-build.log new file mode 100644 index 0000000..104c31c --- /dev/null +++ b/nbproject/private/Default-build.log @@ -0,0 +1,10 @@ +gcc -std=gnu11 -o testptr `pkg-config --libs dbus-1 json-c gtk+-3.0` +Package dbus-1 was not found in the pkg-config search path. +Perhaps you should add the directory containing `dbus-1.pc' +to the PKG_CONFIG_PATH environment variable +Package 'dbus-1', required by 'virtual:world', not found +Package 'json-c', required by 'virtual:world', not found +Package 'gtk+-3.0', required by 'virtual:world', not found +gcc: fatal error: no input files +compilation terminated. +make: *** [Makefile:69: testptr] Error 1 diff --git a/nbproject/private/Default-exec.log b/nbproject/private/Default-exec.log new file mode 100644 index 0000000..014ccf3 --- /dev/null +++ b/nbproject/private/Default-exec.log @@ -0,0 +1,7 @@ +called: /usr/bin/gcc + /home/benn/devl/cpp/nbprojects/tests/test_ptr2 + gcc + -std=gnu11 + -o + testptr + diff --git a/nbproject/private/Default.properties b/nbproject/private/Default.properties new file mode 100644 index 0000000..ccc8729 --- /dev/null +++ b/nbproject/private/Default.properties @@ -0,0 +1 @@ +/home/benn/devl/cpp/nbprojects/tests/test_ptr2/src/testptr.cpp=/home/benn/devl/cpp/nbprojects/tests/test_ptr2#-c src/testptr.cpp -Wall -Wextra -Wconversion -Wsign-conversion -march=x86-64 -Wformat-security -fstack-protector-all -Wstack-protector --param ssp-buffer-size=4 -ftrapv -D_FORTIFY_SOURCE=2 -O2 -Wfloat-equal -Wpointer-arith diff --git a/nbproject/private/c_standard_headers_indexer.c b/nbproject/private/c_standard_headers_indexer.c new file mode 100644 index 0000000..c2548d2 --- /dev/null +++ b/nbproject/private/c_standard_headers_indexer.c @@ -0,0 +1,75 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved. + * + * Oracle and Java are registered trademarks of Oracle and/or its affiliates. + * Other names may be trademarks of their respective owners. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common + * Development and Distribution License("CDDL") (collectively, the + * "License"). You may not use this file except in compliance with the + * License. You can obtain a copy of the License at + * http://www.netbeans.org/cddl-gplv2.html + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the + * specific language governing permissions and limitations under the + * License. When distributing the software, include this License Header + * Notice in each file and include the License file at + * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the GPL Version 2 section of the License file that + * accompanied this code. If applicable, add the following below the + * License Header, with the fields enclosed by brackets [] replaced by + * your own identifying information: + * "Portions Copyrighted [year] [name of copyright owner]" + * + * If you wish your version of this file to be governed by only the CDDL + * or only the GPL Version 2, indicate your decision by adding + * "[Contributor] elects to include this software in this distribution + * under the [CDDL or GPL Version 2] license." If you do not indicate a + * single choice of license, a recipient has the option to distribute + * your version of this file under either the CDDL, the GPL Version 2 or + * to extend the choice of license to its licensees as provided above. + * However, if you add GPL Version 2 code and therefore, elected the GPL + * Version 2 license, then the option applies only if the new code is + * made subject to such option by the copyright holder. + * + * Contributor(s): + */ + +// List of standard headers was taken in http://en.cppreference.com/w/c/header + +#include // Conditionally compiled macro that compares its argument to zero +#include // Functions to determine the type contained in character data +#include // Macros reporting error conditions +#include // Limits of float types +#include // Sizes of basic types +#include // Localization utilities +#include // Common mathematics functions +#include // Nonlocal jumps +#include // Signal handling +#include // Variable arguments +#include // Common macro definitions +#include // Input/output +#include // String handling +#include // General utilities: memory management, program utilities, string conversions, random numbers +#include // Time/date utilities +#include // (since C95) Alternative operator spellings +#include // (since C95) Extended multibyte and wide character utilities +#include // (since C95) Wide character classification and mapping utilities +#ifdef _STDC_C99 +#include // (since C99) Complex number arithmetic +#include // (since C99) Floating-point environment +#include // (since C99) Format conversion of integer types +#include // (since C99) Boolean type +#include // (since C99) Fixed-width integer types +#include // (since C99) Type-generic math (macros wrapping math.h and complex.h) +#endif +#ifdef _STDC_C11 +#include // (since C11) alignas and alignof convenience macros +#include // (since C11) Atomic types +#include // (since C11) noreturn convenience macros +#include // (since C11) Thread library +#include // (since C11) UTF-16 and UTF-32 character utilities +#endif diff --git a/nbproject/private/configurations.xml b/nbproject/private/configurations.xml new file mode 100644 index 0000000..b69b0b8 --- /dev/null +++ b/nbproject/private/configurations.xml @@ -0,0 +1,115 @@ + + + + + + + + + + testptr.cpp + + + + Makefile + + + + localhost + 2 + + + + ${AUTO_FOLDER} + . + + ${AUTO_FOLDER} + + ${MAKE} ${ITEM_NAME}.o + make -f Makefile debug + make debug + make -f Makefile + ${MAKE} -f Makefile + ${AUTO_COMPILE} + + ${AUTO_COMPILE} + + + + + + + + + + + + + + + + + gdb + + + + "${OUTPUT_PATH}" + + "${OUTPUT_PATH}" + + false + 0 + 0 + + + + + + + localhost + 2 + + + + . + ${AUTO_FOLDER} + + ${AUTO_FOLDER} + + ${MAKE} ${ITEM_NAME}.o + ${AUTO_COMPILE} + + ${AUTO_COMPILE} + + + + + + + + + + + + + + + + + gdb + + + + "${OUTPUT_PATH}" + + "${OUTPUT_PATH}" + . + false + 0 + 0 + + + + + + diff --git a/nbproject/private/cpp_standard_headers_indexer.cpp b/nbproject/private/cpp_standard_headers_indexer.cpp new file mode 100644 index 0000000..04f6fa6 --- /dev/null +++ b/nbproject/private/cpp_standard_headers_indexer.cpp @@ -0,0 +1,135 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved. + * + * Oracle and Java are registered trademarks of Oracle and/or its affiliates. + * Other names may be trademarks of their respective owners. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common + * Development and Distribution License("CDDL") (collectively, the + * "License"). You may not use this file except in compliance with the + * License. You can obtain a copy of the License at + * http://www.netbeans.org/cddl-gplv2.html + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the + * specific language governing permissions and limitations under the + * License. When distributing the software, include this License Header + * Notice in each file and include the License file at + * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the GPL Version 2 section of the License file that + * accompanied this code. If applicable, add the following below the + * License Header, with the fields enclosed by brackets [] replaced by + * your own identifying information: + * "Portions Copyrighted [year] [name of copyright owner]" + * + * If you wish your version of this file to be governed by only the CDDL + * or only the GPL Version 2, indicate your decision by adding + * "[Contributor] elects to include this software in this distribution + * under the [CDDL or GPL Version 2] license." If you do not indicate a + * single choice of license, a recipient has the option to distribute + * your version of this file under either the CDDL, the GPL Version 2 or + * to extend the choice of license to its licensees as provided above. + * However, if you add GPL Version 2 code and therefore, elected the GPL + * Version 2 license, then the option applies only if the new code is + * made subject to such option by the copyright holder. + * + * Contributor(s): + */ + +// List of standard headers was taken in http://en.cppreference.com/w/cpp/header + +#include // General purpose utilities: program control, dynamic memory allocation, random numbers, sort and search +#include // Functions and macro constants for signal management +#include // Macro (and function) that saves (and jumps) to an execution context +#include // Handling of variable length argument lists +#include // Runtime type information utilities +#include // std::bitset class template +#include // Function objects, designed for use with the standard algorithms +#include // Various utility components +#include // C-style time/date utilites +#include // typedefs for types such as size_t, NULL and others +#include // Low-level memory management utilities +#include // Higher level memory management utilities +#include // limits of integral types +#include // limits of float types +#include // standardized way to query properties of arithmetic types +#include // Exception handling utilities +#include // Standard exception objects +#include // Conditionally compiled macro that compares its argument to zero +#include // Macro containing the last error number +#include // functions to determine the type contained in character data +#include // functions for determining the type of wide character data +#include // various narrow character string handling functions +#include // various wide and multibyte string handling functions +#include // std::basic_string class template +#include // std::vector container +#include // std::deque container +#include // std::list container +#include // std::set and std::multiset associative containers +#include // std::map and std::multimap associative containers +#include // std::stack container adaptor +#include // std::queue and std::priority_queue container adaptors +#include // Algorithms that operate on containers +#include // Container iterators +#include // Common mathematics functions +#include // Complex number type +#include // Class for representing and manipulating arrays of values +#include // Numeric operations on values in containers +#include // forward declarations of all classes in the input/output library +#include // std::ios_base class, std::basic_ios class template and several typedefs +#include // std::basic_istream class template and several typedefs +#include // std::basic_ostream, std::basic_iostream class templates and several typedefs +#include // several standard stream objects +#include // std::basic_fstream, std::basic_ifstream, std::basic_ofstream class templates and several typedefs +#include // std::basic_stringstream, std::basic_istringstream, std::basic_ostringstream class templates and several typedefs +#include // std::strstream, std::istrstream, std::ostrstream(deprecated) +#include // Helper functions to control the format or input and output +#include // std::basic_streambuf class template +#include // C-style input-output functions +#include // Localization utilities +#include // C localization utilities +#include // empty header. The macros that appear in iso646.h in C are keywords in C++ +#if __cplusplus >= 201103L +#include // (since C++11) std::type_index +#include // (since C++11) Compile-time type information +#include // (since C++11) C++ time utilites +#include // (since C++11) std::initializer_list class template +#include // (since C++11) std::tuple class template +#include // (since C++11) Nested allocator class +#include // (since C++11) fixed-size types and limits of other types +#include // (since C++11) formatting macros , intmax_t and uintmax_t math and conversions +#include // (since C++11) defines std::error_code, a platform-dependent error code +#include // (since C++11) C-style Unicode character conversion functions +#include // (since C++11) std::array container +#include // (since C++11) std::forward_list container +#include // (since C++11) std::unordered_set and std::unordered_multiset unordered associative containers +#include // (since C++11) std::unordered_map and std::unordered_multimap unordered associative containers +#include // (since C++11) Random number generators and distributions +#include // (since C++11) Compile-time rational arithmetic +#include // (since C++11) Floating-point environment access functions +#include // (since C++11) Unicode conversion facilities +#include // (since C++11) Classes, algorithms and iterators to support regular expression processing +#include // (since C++11) Atomic operations library +#include // (since C++11)(deprecated in C++17) simply includes the header +#include // (since C++11)(deprecated in C++17) simply includes the headers (until C++17) (since C++17) and : the overloads equivalent to the contents of the C header tgmath.h are already provided by those headers +#include // (since C++11)(deprecated in C++17) defines one compatibility macro constant +#include // (since C++11)(deprecated in C++17) defines one compatibility macro constant +#include // (since C++11) std::thread class and supporting functions +#include // (since C++11) mutual exclusion primitives +#include // (since C++11) primitives for asynchronous computations +#include // (since C++11) thread waiting conditions +#endif +#if __cplusplus >= 201300L +#include // (since C++14) shared mutual exclusion primitives +#endif +#if __cplusplus >= 201500L +#include // (since C++17) std::any class template +#include // (since C++17) std::optional class template +#include // (since C++17) std::variant class template +#include // (since C++17) Polymorphic allocators and memory resources +#include // (since C++17) std::basic_string_view class template +#include // (since C++17) Predefined execution policies for parallel versions of the algorithms +#include // (since C++17) std::path class and supporting functions +#endif diff --git a/nbproject/private/debug.properties b/nbproject/private/debug.properties new file mode 100644 index 0000000..f379b0b --- /dev/null +++ b/nbproject/private/debug.properties @@ -0,0 +1 @@ +/home/benn/devl/cpp/nbprojects/tests/test_ptr2/src/testptr.cpp=/home/benn/devl/cpp/nbprojects/tests/test_ptr2#-Wall -Wextra -Wconversion -Wsign-conversion -march=x86-64 -Wformat-security -fstack-protector-all -Wstack-protector --param ssp-buffer-size=4 -ftrapv -D_FORTIFY_SOURCE=2 -O2 -Wfloat-equal -Wpointer-arith -o obj/testptr.o -c src/testptr.cpp diff --git a/nbproject/private/launcher.properties b/nbproject/private/launcher.properties new file mode 100644 index 0000000..3edc2d8 --- /dev/null +++ b/nbproject/private/launcher.properties @@ -0,0 +1,42 @@ +# Launchers File syntax: +# +# [Must-have property line] +# launcher1.runCommand= +# [Optional extra properties] +# launcher1.displayName= +# launcher1.hide= +# launcher1.buildCommand= +# launcher1.runDir= +# launcher1.runInOwnTab= +# launcher1.symbolFiles= +# launcher1.env.= +# (If this value is quoted with ` it is handled as a native command which execution result will become the value) +# [Common launcher properties] +# common.runDir= +# (This value is overwritten by a launcher specific runDir value if the latter exists) +# common.env.= +# (Environment variables from common launcher are merged with launcher specific variables) +# common.symbolFiles= +# (This value is overwritten by a launcher specific symbolFiles value if the latter exists) +# +# In runDir, symbolFiles and env fields you can use these macroses: +# ${PROJECT_DIR} - project directory absolute path +# ${OUTPUT_PATH} - linker output path (relative to project directory path) +# ${OUTPUT_BASENAME}- linker output filename +# ${TESTDIR} - test files directory (relative to project directory path) +# ${OBJECTDIR} - object files directory (relative to project directory path) +# ${CND_DISTDIR} - distribution directory (relative to project directory path) +# ${CND_BUILDDIR} - build directory (relative to project directory path) +# ${CND_PLATFORM} - platform name +# ${CND_CONF} - configuration name +# ${CND_DLIB_EXT} - dynamic library extension +# +# All the project launchers must be listed in the file! +# +# launcher1.runCommand=... +# launcher2.runCommand=... +# ... +# common.runDir=... +# common.env.KEY=VALUE + +# launcher1.runCommand= \ No newline at end of file diff --git a/nbproject/private/private.xml b/nbproject/private/private.xml new file mode 100644 index 0000000..6b74e49 --- /dev/null +++ b/nbproject/private/private.xml @@ -0,0 +1,17 @@ + + + + true + + + 0 + 0 + + + + + file:/home/benn/devl/cpp/nbprojects/tests/test_ptr2/Makefile + file:/home/benn/devl/cpp/nbprojects/tests/test_ptr2/src/testptr.cpp + + + diff --git a/nbproject/project.xml b/nbproject/project.xml new file mode 100644 index 0000000..3b66fbe --- /dev/null +++ b/nbproject/project.xml @@ -0,0 +1,30 @@ + + + org.netbeans.modules.cnd.makeproject + + + test_ptr2 + + cpp + + UTF-8 + + + . + + + + debug + 0 + + + Default + 0 + + + + false + + + + diff --git a/src/myapp.cpp b/src/myapp.cpp new file mode 100644 index 0000000..425fc10 --- /dev/null +++ b/src/myapp.cpp @@ -0,0 +1,30 @@ +// +// Sample source file for NetBeans for C/C++ projects +// Copyright (C) 2025 Benny Lyons +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// + +#include + + +int main () +{ + std::cout << "Hi" << '\n'; + + return 0; +} + +