Skip to content

Commit df97f9c

Browse files
committed
サンプルプログラム
1 parent d22e2f2 commit df97f9c

File tree

3 files changed

+18
-12
lines changed

3 files changed

+18
-12
lines changed

GcodeParser.sln

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GcodeParser", "GcodeParser\GcodeParser.vcxproj", "{7E912BA5-47BE-4383-8328-E5166A966B1C}"
77
EndProject
88
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Sample", "Sample\Sample.vcxproj", "{47C54EC6-F055-46E1-8C3C-A7FED9047814}"
9+
ProjectSection(ProjectDependencies) = postProject
10+
{7E912BA5-47BE-4383-8328-E5166A966B1C} = {7E912BA5-47BE-4383-8328-E5166A966B1C}
11+
EndProjectSection
912
EndProject
1013
Global
1114
GlobalSection(SolutionConfigurationPlatforms) = preSolution

Sample/Sample.cpp

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,21 @@
22
//
33

44
#include <iostream>
5+
#include <string>
6+
#include "../GcodeParser/GcodeParser.h"
7+
8+
using namespace std;
59

610
int main()
711
{
8-
std::cout << "Hello World!\n";
9-
}
12+
GcodeParser gp;
13+
string s, w;
1014

11-
// プログラムの実行: Ctrl + F5 または [デバッグ] > [デバッグなしで開始] メニュー
12-
// プログラムのデバッグ: F5 または [デバッグ] > [デバッグの開始] メニュー
13-
14-
// 作業を開始するためのヒント:
15-
// 1. ソリューション エクスプローラー ウィンドウを使用してファイルを追加/管理します
16-
// 2. チーム エクスプローラー ウィンドウを使用してソース管理に接続します
17-
// 3. 出力ウィンドウを使用して、ビルド出力とその他のメッセージを表示します
18-
// 4. エラー一覧ウィンドウを使用してエラーを表示します
19-
// 5. [プロジェクト] > [新しい項目の追加] と移動して新しいコード ファイルを作成するか、[プロジェクト] > [既存の項目の追加] と移動して既存のコード ファイルをプロジェクトに追加します
20-
// 6. 後ほどこのプロジェクトを再び開く場合、[ファイル] > [開く] > [プロジェクト] と移動して .sln ファイルを選択します
15+
while ( getline(cin, s) ) {
16+
gp.SetBlock(s);
17+
while ( !(w=gp.GetWord()).empty() ) {
18+
cout << "<" << w << "> ";
19+
}
20+
cout << "\n";
21+
}
22+
}

Sample/Sample.vcxproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@
109109
<Link>
110110
<SubSystem>Console</SubSystem>
111111
<GenerateDebugInformation>true</GenerateDebugInformation>
112+
<AdditionalDependencies>..\x64\Debug\GcodeParser.lib;%(AdditionalDependencies)</AdditionalDependencies>
112113
</Link>
113114
</ItemDefinitionGroup>
114115
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">

0 commit comments

Comments
 (0)