Skip to content

Commit bbdca8a

Browse files
committed
Added materail for Section06 thus far.
1 parent 4fde6eb commit bbdca8a

39 files changed

+1978
-0
lines changed
6 KB
Binary file not shown.
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Session Name="C:\Users\frank\Desktop\CPPExamples\Section6\Section6.workspace">
3+
<int Value="0" Name="m_selectedTab"/>
4+
<wxString Value="C:\Users\frank\Desktop\CPPExamples\Section6\Section6.workspace" Name="m_workspaceName"/>
5+
<TabInfoArray Name="TabInfoArray"/>
6+
<SerializedObject Name="m_breakpoints">
7+
<long Value="0" Name="Count"/>
8+
</SerializedObject>
9+
</Session>
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
##
2+
## Auto Generated makefile by CodeLite IDE
3+
## any manual changes will be erased
4+
##
5+
## Debug
6+
ProjectName :=Challenge
7+
ConfigurationName :=Debug
8+
WorkspacePath :=C:/Users/frank/Desktop/CPPExamples/Section6
9+
ProjectPath :=C:/Users/frank/Desktop/CPPExamples/Section6/Challenge
10+
IntermediateDirectory :=./Debug
11+
OutDir := $(IntermediateDirectory)
12+
CurrentFileName :=
13+
CurrentFilePath :=
14+
CurrentFileFullPath :=
15+
User :=frank
16+
Date :=31/01/2018
17+
CodeLitePath :="C:/Program Files/CodeLite"
18+
LinkerName :=C:/MinGW/bin/g++.exe
19+
SharedObjectLinkerName :=C:/MinGW/bin/g++.exe -shared -fPIC
20+
ObjectSuffix :=.o
21+
DependSuffix :=.o.d
22+
PreprocessSuffix :=.i
23+
DebugSwitch :=-g
24+
IncludeSwitch :=-I
25+
LibrarySwitch :=-l
26+
OutputSwitch :=-o
27+
LibraryPathSwitch :=-L
28+
PreprocessorSwitch :=-D
29+
SourceSwitch :=-c
30+
OutputFile :=$(IntermediateDirectory)/$(ProjectName)
31+
Preprocessors :=
32+
ObjectSwitch :=-o
33+
ArchiveOutputSwitch :=
34+
PreprocessOnlySwitch :=-E
35+
ObjectsFileList :="Challenge.txt"
36+
PCHCompileFlags :=
37+
MakeDirCommand :=makedir
38+
RcCmpOptions :=
39+
RcCompilerName :=C:/MinGW/bin/windres.exe
40+
LinkOptions :=
41+
IncludePath := $(IncludeSwitch). $(IncludeSwitch).
42+
IncludePCH :=
43+
RcIncludePath :=
44+
Libs :=
45+
ArLibs :=
46+
LibPath := $(LibraryPathSwitch).
47+
48+
##
49+
## Common variables
50+
## AR, CXX, CC, AS, CXXFLAGS and CFLAGS can be overriden using an environment variables
51+
##
52+
AR := C:/MinGW/bin/ar.exe rcu
53+
CXX := C:/MinGW/bin/g++.exe
54+
CC := C:/MinGW/bin/gcc.exe
55+
CXXFLAGS := -std=c++14 -Wall -g -O0 -std=c++14 -Wall $(Preprocessors)
56+
CFLAGS := -g -O0 -Wall $(Preprocessors)
57+
ASFLAGS :=
58+
AS := C:/MinGW/bin/as.exe
59+
60+
61+
##
62+
## User defined environment variables
63+
##
64+
CodeLiteDir:=C:\Program Files\CodeLite
65+
Objects0=$(IntermediateDirectory)/main.cpp$(ObjectSuffix)
66+
67+
68+
69+
Objects=$(Objects0)
70+
71+
##
72+
## Main Build Targets
73+
##
74+
.PHONY: all clean PreBuild PrePreBuild PostBuild MakeIntermediateDirs
75+
all: $(OutputFile)
76+
77+
$(OutputFile): $(IntermediateDirectory)/.d $(Objects)
78+
@$(MakeDirCommand) $(@D)
79+
@echo "" > $(IntermediateDirectory)/.d
80+
@echo $(Objects0) > $(ObjectsFileList)
81+
$(LinkerName) $(OutputSwitch)$(OutputFile) @$(ObjectsFileList) $(LibPath) $(Libs) $(LinkOptions)
82+
83+
MakeIntermediateDirs:
84+
@$(MakeDirCommand) "./Debug"
85+
86+
87+
$(IntermediateDirectory)/.d:
88+
@$(MakeDirCommand) "./Debug"
89+
90+
PreBuild:
91+
92+
93+
##
94+
## Objects
95+
##
96+
$(IntermediateDirectory)/main.cpp$(ObjectSuffix): main.cpp $(IntermediateDirectory)/main.cpp$(DependSuffix)
97+
$(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/frank/Desktop/CPPExamples/Section6/Challenge/main.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/main.cpp$(ObjectSuffix) $(IncludePath)
98+
$(IntermediateDirectory)/main.cpp$(DependSuffix): main.cpp
99+
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/main.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/main.cpp$(DependSuffix) -MM main.cpp
100+
101+
$(IntermediateDirectory)/main.cpp$(PreprocessSuffix): main.cpp
102+
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/main.cpp$(PreprocessSuffix) main.cpp
103+
104+
105+
-include $(IntermediateDirectory)/*$(DependSuffix)
106+
##
107+
## Clean
108+
##
109+
clean:
110+
$(RM) -r ./Debug/
111+
112+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<CodeLite_Project Name="Challenge" Version="10.0.0" InternalType="User templates">
3+
<Plugins>
4+
<Plugin Name="qmake">
5+
<![CDATA[00010001N0005Debug000000000000]]>
6+
</Plugin>
7+
</Plugins>
8+
<Description/>
9+
<Dependencies/>
10+
<Settings Type="Executable">
11+
<GlobalSettings>
12+
<Compiler Options="-std=c++14;-Wall" C_Options="" Assembler="">
13+
<IncludePath Value="."/>
14+
</Compiler>
15+
<Linker Options="">
16+
<LibraryPath Value="."/>
17+
</Linker>
18+
<ResourceCompiler Options=""/>
19+
</GlobalSettings>
20+
<Configuration Name="Debug" CompilerType="MinGW ( MinGW )" DebuggerType="GNU gdb debugger" Type="Executable" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
21+
<Compiler Options="-g;-O0;-std=c++14;-Wall" C_Options="-g;-O0;-Wall" Assembler="" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" PCHFlags="" PCHFlagsPolicy="0">
22+
<IncludePath Value="."/>
23+
</Compiler>
24+
<Linker Options="" Required="yes"/>
25+
<ResourceCompiler Options="" Required="no"/>
26+
<General OutputFile="$(IntermediateDirectory)/$(ProjectName)" IntermediateDirectory="./Debug" Command="./$(ProjectName)" CommandArguments="" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="$(IntermediateDirectory)" PauseExecWhenProcTerminates="yes" IsGUIProgram="no" IsEnabled="yes"/>
27+
<BuildSystem Name="Default"/>
28+
<Environment EnvVarSetName="&lt;Use Defaults&gt;" DbgSetName="&lt;Use Defaults&gt;">
29+
<![CDATA[]]>
30+
</Environment>
31+
<Debugger IsRemote="no" RemoteHostName="" RemoteHostPort="" DebuggerPath="" IsExtended="yes">
32+
<DebuggerSearchPaths/>
33+
<PostConnectCommands/>
34+
<StartupCommands/>
35+
</Debugger>
36+
<PreBuild/>
37+
<PostBuild/>
38+
<CustomBuild Enabled="no">
39+
<RebuildCommand/>
40+
<CleanCommand/>
41+
<BuildCommand/>
42+
<PreprocessFileCommand/>
43+
<SingleFileCommand/>
44+
<MakefileGenerationCommand/>
45+
<ThirdPartyToolName>None</ThirdPartyToolName>
46+
<WorkingDirectory/>
47+
</CustomBuild>
48+
<AdditionalRules>
49+
<CustomPostBuild/>
50+
<CustomPreBuild/>
51+
</AdditionalRules>
52+
<Completion EnableCpp11="no" EnableCpp14="yes">
53+
<ClangCmpFlagsC/>
54+
<ClangCmpFlags/>
55+
<ClangPP/>
56+
<SearchPaths/>
57+
</Completion>
58+
</Configuration>
59+
<Configuration Name="Release" CompilerType="MinGW ( MinGW )" DebuggerType="GNU gdb debugger" Type="Executable" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
60+
<Compiler Options="-O2;-Wall" C_Options="-O2;-Wall" Assembler="" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" PCHFlags="" PCHFlagsPolicy="0">
61+
<IncludePath Value="."/>
62+
<Preprocessor Value="NDEBUG"/>
63+
</Compiler>
64+
<Linker Options="" Required="yes"/>
65+
<ResourceCompiler Options="" Required="no"/>
66+
<General OutputFile="$(IntermediateDirectory)/$(ProjectName)" IntermediateDirectory="./Release" Command="./$(ProjectName)" CommandArguments="" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="$(IntermediateDirectory)" PauseExecWhenProcTerminates="yes" IsGUIProgram="no" IsEnabled="yes"/>
67+
<BuildSystem Name="Default"/>
68+
<Environment EnvVarSetName="&lt;Use Defaults&gt;" DbgSetName="&lt;Use Defaults&gt;">
69+
<![CDATA[]]>
70+
</Environment>
71+
<Debugger IsRemote="no" RemoteHostName="" RemoteHostPort="" DebuggerPath="" IsExtended="yes">
72+
<DebuggerSearchPaths/>
73+
<PostConnectCommands/>
74+
<StartupCommands/>
75+
</Debugger>
76+
<PreBuild/>
77+
<PostBuild/>
78+
<CustomBuild Enabled="no">
79+
<RebuildCommand/>
80+
<CleanCommand/>
81+
<BuildCommand/>
82+
<PreprocessFileCommand/>
83+
<SingleFileCommand/>
84+
<MakefileGenerationCommand/>
85+
<ThirdPartyToolName>None</ThirdPartyToolName>
86+
<WorkingDirectory/>
87+
</CustomBuild>
88+
<AdditionalRules>
89+
<CustomPostBuild/>
90+
<CustomPreBuild/>
91+
</AdditionalRules>
92+
<Completion EnableCpp11="no" EnableCpp14="no">
93+
<ClangCmpFlagsC/>
94+
<ClangCmpFlags/>
95+
<ClangPP/>
96+
<SearchPaths/>
97+
</Completion>
98+
</Configuration>
99+
</Settings>
100+
<VirtualDirectory Name="src">
101+
<File Name="main.cpp"/>
102+
</VirtualDirectory>
103+
</CodeLite_Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
2+
// Section 6
3+
// Challenge
4+
5+
/*
6+
Frank's Carpet Cleaning Service
7+
Charges:
8+
$25 per small room
9+
$35 per large room
10+
Sales tax rate is 6%
11+
Estimates are valid for 30 days
12+
13+
Prompt the user for the number of small and large rooms they would like cleaned
14+
and provide an estimate such as:
15+
16+
Estimate for carpet cleaning service
17+
Number of small rooms: 3
18+
Number of large rooms: 1
19+
Price per small room: $25
20+
Price per large room: $35
21+
Cost : $110
22+
Tax: $6.6
23+
===============================
24+
Total estimate: $116.6
25+
This estimate is valid for 30 days
26+
*/
27+
28+
#include <iostream>
29+
30+
using namespace std;
31+
32+
int main() {
33+
34+
35+
cout << endl;
36+
return 0;
37+
}
38+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
##
2+
## Auto Generated makefile by CodeLite IDE
3+
## any manual changes will be erased
4+
##
5+
## Debug
6+
ProjectName :=ChallengeSolution
7+
ConfigurationName :=Debug
8+
WorkspacePath :=C:/Users/frank/Desktop/CPPExamples/Section6
9+
ProjectPath :=C:/Users/frank/Desktop/CPPExamples/Section6/ChallengeSolution
10+
IntermediateDirectory :=./Debug
11+
OutDir := $(IntermediateDirectory)
12+
CurrentFileName :=
13+
CurrentFilePath :=
14+
CurrentFileFullPath :=
15+
User :=frank
16+
Date :=31/01/2018
17+
CodeLitePath :="C:/Program Files/CodeLite"
18+
LinkerName :=C:/MinGW/bin/g++.exe
19+
SharedObjectLinkerName :=C:/MinGW/bin/g++.exe -shared -fPIC
20+
ObjectSuffix :=.o
21+
DependSuffix :=.o.d
22+
PreprocessSuffix :=.i
23+
DebugSwitch :=-g
24+
IncludeSwitch :=-I
25+
LibrarySwitch :=-l
26+
OutputSwitch :=-o
27+
LibraryPathSwitch :=-L
28+
PreprocessorSwitch :=-D
29+
SourceSwitch :=-c
30+
OutputFile :=$(IntermediateDirectory)/$(ProjectName)
31+
Preprocessors :=
32+
ObjectSwitch :=-o
33+
ArchiveOutputSwitch :=
34+
PreprocessOnlySwitch :=-E
35+
ObjectsFileList :="ChallengeSolution.txt"
36+
PCHCompileFlags :=
37+
MakeDirCommand :=makedir
38+
RcCmpOptions :=
39+
RcCompilerName :=C:/MinGW/bin/windres.exe
40+
LinkOptions :=
41+
IncludePath := $(IncludeSwitch). $(IncludeSwitch).
42+
IncludePCH :=
43+
RcIncludePath :=
44+
Libs :=
45+
ArLibs :=
46+
LibPath := $(LibraryPathSwitch).
47+
48+
##
49+
## Common variables
50+
## AR, CXX, CC, AS, CXXFLAGS and CFLAGS can be overriden using an environment variables
51+
##
52+
AR := C:/MinGW/bin/ar.exe rcu
53+
CXX := C:/MinGW/bin/g++.exe
54+
CC := C:/MinGW/bin/gcc.exe
55+
CXXFLAGS := -std=c++14 -Wall -g -O0 -std=c++14 -Wall $(Preprocessors)
56+
CFLAGS := -g -O0 -Wall $(Preprocessors)
57+
ASFLAGS :=
58+
AS := C:/MinGW/bin/as.exe
59+
60+
61+
##
62+
## User defined environment variables
63+
##
64+
CodeLiteDir:=C:\Program Files\CodeLite
65+
Objects0=$(IntermediateDirectory)/main.cpp$(ObjectSuffix)
66+
67+
68+
69+
Objects=$(Objects0)
70+
71+
##
72+
## Main Build Targets
73+
##
74+
.PHONY: all clean PreBuild PrePreBuild PostBuild MakeIntermediateDirs
75+
all: $(OutputFile)
76+
77+
$(OutputFile): $(IntermediateDirectory)/.d $(Objects)
78+
@$(MakeDirCommand) $(@D)
79+
@echo "" > $(IntermediateDirectory)/.d
80+
@echo $(Objects0) > $(ObjectsFileList)
81+
$(LinkerName) $(OutputSwitch)$(OutputFile) @$(ObjectsFileList) $(LibPath) $(Libs) $(LinkOptions)
82+
83+
MakeIntermediateDirs:
84+
@$(MakeDirCommand) "./Debug"
85+
86+
87+
$(IntermediateDirectory)/.d:
88+
@$(MakeDirCommand) "./Debug"
89+
90+
PreBuild:
91+
92+
93+
##
94+
## Objects
95+
##
96+
$(IntermediateDirectory)/main.cpp$(ObjectSuffix): main.cpp $(IntermediateDirectory)/main.cpp$(DependSuffix)
97+
$(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/frank/Desktop/CPPExamples/Section6/ChallengeSolution/main.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/main.cpp$(ObjectSuffix) $(IncludePath)
98+
$(IntermediateDirectory)/main.cpp$(DependSuffix): main.cpp
99+
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/main.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/main.cpp$(DependSuffix) -MM main.cpp
100+
101+
$(IntermediateDirectory)/main.cpp$(PreprocessSuffix): main.cpp
102+
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/main.cpp$(PreprocessSuffix) main.cpp
103+
104+
105+
-include $(IntermediateDirectory)/*$(DependSuffix)
106+
##
107+
## Clean
108+
##
109+
clean:
110+
$(RM) -r ./Debug/
111+
112+

0 commit comments

Comments
 (0)