summaryrefslogtreecommitdiff
path: root/Hello World
diff options
context:
space:
mode:
Diffstat (limited to 'Hello World')
-rw-r--r--Hello World/Hello World/InclassWork/InclassWork.sln31
-rw-r--r--Hello World/Hello World/InclassWork/InclassWork/Header.h11
-rw-r--r--Hello World/Hello World/InclassWork/InclassWork/InclassWork.vcxproj138
-rw-r--r--Hello World/Hello World/InclassWork/InclassWork/InclassWork.vcxproj.filters27
-rw-r--r--Hello World/Hello World/InclassWork/InclassWork/Source.cpp52
-rw-r--r--Hello World/Hello World/Program.cpp30
6 files changed, 285 insertions, 4 deletions
diff --git a/Hello World/Hello World/InclassWork/InclassWork.sln b/Hello World/Hello World/InclassWork/InclassWork.sln
new file mode 100644
index 0000000..95a89fd
--- /dev/null
+++ b/Hello World/Hello World/InclassWork/InclassWork.sln
@@ -0,0 +1,31 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.8.34408.163
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "InclassWork", "InclassWork\InclassWork.vcxproj", "{6645CED9-E7D7-4153-89EA-3100C1432E48}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {6645CED9-E7D7-4153-89EA-3100C1432E48}.Debug|x64.ActiveCfg = Debug|x64
+ {6645CED9-E7D7-4153-89EA-3100C1432E48}.Debug|x64.Build.0 = Debug|x64
+ {6645CED9-E7D7-4153-89EA-3100C1432E48}.Debug|x86.ActiveCfg = Debug|Win32
+ {6645CED9-E7D7-4153-89EA-3100C1432E48}.Debug|x86.Build.0 = Debug|Win32
+ {6645CED9-E7D7-4153-89EA-3100C1432E48}.Release|x64.ActiveCfg = Release|x64
+ {6645CED9-E7D7-4153-89EA-3100C1432E48}.Release|x64.Build.0 = Release|x64
+ {6645CED9-E7D7-4153-89EA-3100C1432E48}.Release|x86.ActiveCfg = Release|Win32
+ {6645CED9-E7D7-4153-89EA-3100C1432E48}.Release|x86.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {AD29E421-6083-454D-ABE2-B664362BF4AB}
+ EndGlobalSection
+EndGlobal
diff --git a/Hello World/Hello World/InclassWork/InclassWork/Header.h b/Hello World/Hello World/InclassWork/InclassWork/Header.h
new file mode 100644
index 0000000..050ffac
--- /dev/null
+++ b/Hello World/Hello World/InclassWork/InclassWork/Header.h
@@ -0,0 +1,11 @@
+#ifndef MY_HELPERS_HPP
+$define MY_HELPERS_HPP
+
+double doubleFunction(double newVar);
+char charFunction();
+size_t arraySize();
+void noReturn();
+
+
+
+#endif MY_HELPERS_HPP \ No newline at end of file
diff --git a/Hello World/Hello World/InclassWork/InclassWork/InclassWork.vcxproj b/Hello World/Hello World/InclassWork/InclassWork/InclassWork.vcxproj
new file mode 100644
index 0000000..10f9998
--- /dev/null
+++ b/Hello World/Hello World/InclassWork/InclassWork/InclassWork.vcxproj
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <VCProjectVersion>17.0</VCProjectVersion>
+ <Keyword>Win32Proj</Keyword>
+ <ProjectGuid>{6645ced9-e7d7-4153-89ea-3100c1432e48}</ProjectGuid>
+ <RootNamespace>InclassWork</RootNamespace>
+ <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v143</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v143</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v143</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v143</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="Shared">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <SDLCheck>true</SDLCheck>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ConformanceMode>true</ConformanceMode>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <SDLCheck>true</SDLCheck>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ConformanceMode>true</ConformanceMode>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <SDLCheck>true</SDLCheck>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ConformanceMode>true</ConformanceMode>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <SDLCheck>true</SDLCheck>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ConformanceMode>true</ConformanceMode>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="Source.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="Header.h" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/Hello World/Hello World/InclassWork/InclassWork/InclassWork.vcxproj.filters b/Hello World/Hello World/InclassWork/InclassWork/InclassWork.vcxproj.filters
new file mode 100644
index 0000000..25c729c
--- /dev/null
+++ b/Hello World/Hello World/InclassWork/InclassWork/InclassWork.vcxproj.filters
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="Source.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="Header.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/Hello World/Hello World/InclassWork/InclassWork/Source.cpp b/Hello World/Hello World/InclassWork/InclassWork/Source.cpp
new file mode 100644
index 0000000..427c564
--- /dev/null
+++ b/Hello World/Hello World/InclassWork/InclassWork/Source.cpp
@@ -0,0 +1,52 @@
+// Name: Asahel Lopez //
+
+#include <iostream>
+#include "helpers.h"
+
+int main()
+{
+ //noReturn();
+ //arraysize();
+ //char c = charFunctiuon();
+
+ double newVar = 5.7896;
+
+ double newDouble = doubleFunction(newVar);
+ std::cout << newDouble << std::endl;
+ std::cout << newVar << std::endl;
+
+ return 0;
+}
+
+double doubleFunction(double& newVar)
+
+double var = newVar * 2;
+newVar = var;
+return var;
+}
+
+char charFunction() {
+ return'y';
+}
+
+
+size_t arraySize() {
+ return 631635416354;
+
+
+
+ void noReturn() {
+ std::cout << " this does not return anything";
+
+ return;
+ }
+}
+
+
+
+
+
+
+
+
+
diff --git a/Hello World/Hello World/Program.cpp b/Hello World/Hello World/Program.cpp
index 34032d1..a44fd9b 100644
--- a/Hello World/Hello World/Program.cpp
+++ b/Hello World/Hello World/Program.cpp
@@ -1,7 +1,7 @@
// Name: Asahel Lopez
// Date: 1/10/24
// Class: CST116
-// Assignment: Inclass Exercise 1
+// Assignment: Inclass Exercise 1/ Homework 1
#include <iostream>
@@ -13,9 +13,9 @@ int main()
{
cout << "Hello World" << endl;
- int j;
- int k;
- int l;
+ int j = 5;
+ int k = 10;
+ int l = 1;
const int m = 1024;
@@ -35,10 +35,32 @@ int main()
cout << "The three variables multiplied equal" << k * j * l << endl;
+ union Data{
+ int number;
+ float cash;
+ bool amBroke;
+
+ };
+ Data newData{
+ newData.number = 10
+ };
+ cout << newData.number << endl;
+
+ newData.cash = 15.15;
+
+ cout << newData.cash << endl;
+ typedef unsigned char BYTE;
+ BYTE b1, b2;
+ enum Action {
+ MoveFile,
+ StartService,
+ DeleteFile = 0,
+ };
+ cout << DeleteFile << endl;
return 0;
} \ No newline at end of file