-
Notifications
You must be signed in to change notification settings - Fork 0
Balance brackets #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Balance brackets #15
Changes from 35 commits
1a83386
2549f2f
14417f4
8d6727e
e7e22d6
2f9e2a0
a04a9a8
ac6b390
015e87e
5d2e300
d85663e
6a502c1
cf515a4
77c9d15
0dfb7c2
b720cdc
22af234
c713a82
9a45a27
ae4b6a9
e226c08
13aa804
954da9f
a121942
fe152de
1e1980f
bb748f8
022b692
7f6d2c3
7fe9a12
ad099c8
f6c2352
6c04a72
5f1e13d
4fee312
cb50cd2
8e7b5a1
f50a25c
bcf969b
12dbf94
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| | ||
| Microsoft Visual Studio Solution File, Format Version 12.00 | ||
| # Visual Studio Version 16 | ||
| VisualStudioVersion = 16.0.31410.357 | ||
| MinimumVisualStudioVersion = 10.0.40219.1 | ||
| Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BalanceBrackets", "BalanceBrackets\BalanceBrackets.vcxproj", "{2095AD51-1509-4999-A54D-827860784952}" | ||
| 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 | ||
| {2095AD51-1509-4999-A54D-827860784952}.Debug|x64.ActiveCfg = Debug|x64 | ||
| {2095AD51-1509-4999-A54D-827860784952}.Debug|x64.Build.0 = Debug|x64 | ||
| {2095AD51-1509-4999-A54D-827860784952}.Debug|x86.ActiveCfg = Debug|Win32 | ||
| {2095AD51-1509-4999-A54D-827860784952}.Debug|x86.Build.0 = Debug|Win32 | ||
| {2095AD51-1509-4999-A54D-827860784952}.Release|x64.ActiveCfg = Release|x64 | ||
| {2095AD51-1509-4999-A54D-827860784952}.Release|x64.Build.0 = Release|x64 | ||
| {2095AD51-1509-4999-A54D-827860784952}.Release|x86.ActiveCfg = Release|Win32 | ||
| {2095AD51-1509-4999-A54D-827860784952}.Release|x86.Build.0 = Release|Win32 | ||
| EndGlobalSection | ||
| GlobalSection(SolutionProperties) = preSolution | ||
| HideSolutionNode = FALSE | ||
| EndGlobalSection | ||
| GlobalSection(ExtensibilityGlobals) = postSolution | ||
| SolutionGuid = {241DB504-44F6-401D-9485-FE90894D17CA} | ||
| EndGlobalSection | ||
| EndGlobal |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| #include "BalanceBrackets.h" | ||
| #include "../../Stack/Stack/Stack.h" | ||
| #include <stdlib.h> | ||
|
|
||
| bool checkCorrectOrderBrackets(const char* expressionFromParentheses) | ||
| { | ||
| Stack* head = NULL; | ||
| int counter = 0; | ||
| while (expressionFromParentheses[counter] != '\0') | ||
| { | ||
| if (expressionFromParentheses[counter] == '(' || expressionFromParentheses[counter] == '{' | ||
| || expressionFromParentheses[counter] == '[') | ||
| { | ||
| push(&head, expressionFromParentheses[counter]); | ||
| } | ||
| else if (expressionFromParentheses[counter] == ')' || expressionFromParentheses[counter] == '}' | ||
| || expressionFromParentheses[counter] == ']') | ||
| { | ||
| int error = 0; | ||
| char topOfTheStack = pop(&head, &error); | ||
| if (error == 1) | ||
| { | ||
| return false; | ||
This comment was marked as resolved.
Sorry, something went wrong. |
||
| } | ||
| if ((topOfTheStack != '(' && expressionFromParentheses[counter] == ')') | ||
| || (topOfTheStack != '{' && expressionFromParentheses[counter] == '}') | ||
| || (topOfTheStack != '[' && expressionFromParentheses[counter] == ']')) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Уважаемые люди рекомендуют сложные условия в отдельные функции выносить |
||
| { | ||
| return false; | ||
| } | ||
| } | ||
| counter++; | ||
| } | ||
| if (isEmpty(head)) | ||
| { | ||
| return true; | ||
This comment was marked as resolved.
Sorry, something went wrong. |
||
| } | ||
| deleteStack(&head); | ||
| return false; | ||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,5 @@ | ||||||
| #pragma once | ||||||
| #include <stdbool.h> | ||||||
|
|
||||||
| // Function to check the correct position of the brackets | ||||||
| bool checkCorrectOrderBrackets(const char* expressionFromParentheses�); | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,155 @@ | ||
| <?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>16.0</VCProjectVersion> | ||
| <Keyword>Win32Proj</Keyword> | ||
| <ProjectGuid>{2095ad51-1509-4999-a54d-827860784952}</ProjectGuid> | ||
| <RootNamespace>BalanceBrackets</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>v142</PlatformToolset> | ||
| <CharacterSet>Unicode</CharacterSet> | ||
| </PropertyGroup> | ||
| <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> | ||
| <ConfigurationType>Application</ConfigurationType> | ||
| <UseDebugLibraries>false</UseDebugLibraries> | ||
| <PlatformToolset>v142</PlatformToolset> | ||
| <WholeProgramOptimization>true</WholeProgramOptimization> | ||
| <CharacterSet>Unicode</CharacterSet> | ||
| </PropertyGroup> | ||
| <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> | ||
| <ConfigurationType>Application</ConfigurationType> | ||
| <UseDebugLibraries>true</UseDebugLibraries> | ||
| <PlatformToolset>v142</PlatformToolset> | ||
| <CharacterSet>Unicode</CharacterSet> | ||
| </PropertyGroup> | ||
| <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> | ||
| <ConfigurationType>Application</ConfigurationType> | ||
| <UseDebugLibraries>false</UseDebugLibraries> | ||
| <PlatformToolset>v142</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" /> | ||
| <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> | ||
| <LinkIncremental>true</LinkIncremental> | ||
| </PropertyGroup> | ||
| <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | ||
| <LinkIncremental>false</LinkIncremental> | ||
| </PropertyGroup> | ||
| <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> | ||
| <LinkIncremental>true</LinkIncremental> | ||
| </PropertyGroup> | ||
| <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> | ||
| <LinkIncremental>false</LinkIncremental> | ||
| </PropertyGroup> | ||
| <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="..\..\Stack\Stack\Stack.c" /> | ||
| <ClCompile Include="BalanceBrackets.c" /> | ||
| <ClCompile Include="BalanceBracketsTest.c" /> | ||
| <ClCompile Include="Main.c" /> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <ClInclude Include="..\..\Stack\Stack\Stack.h" /> | ||
| <ClInclude Include="BalanceBrackets.h" /> | ||
| <ClInclude Include="BalanceBracketsTest.h" /> | ||
| </ItemGroup> | ||
| <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | ||
| <ImportGroup Label="ExtensionTargets"> | ||
| </ImportGroup> | ||
| </Project> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| <ItemGroup> | ||
| <Filter Include="Исходные файлы"> | ||
| <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="Файлы заголовков"> | ||
| <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> | ||
| <Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions> | ||
| </Filter> | ||
| <Filter Include="Файлы ресурсов"> | ||
| <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="BalanceBrackets.c"> | ||
| <Filter>Исходные файлы</Filter> | ||
| </ClCompile> | ||
| <ClCompile Include="BalanceBracketsTest.c"> | ||
| <Filter>Исходные файлы</Filter> | ||
| </ClCompile> | ||
| <ClCompile Include="..\..\Stack\Stack\Stack.c"> | ||
| <Filter>Исходные файлы</Filter> | ||
| </ClCompile> | ||
| <ClCompile Include="Main.c"> | ||
| <Filter>Исходные файлы</Filter> | ||
| </ClCompile> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <ClInclude Include="BalanceBrackets.h"> | ||
| <Filter>Файлы заголовков</Filter> | ||
| </ClInclude> | ||
| <ClInclude Include="..\..\Stack\Stack\Stack.h"> | ||
| <Filter>Файлы заголовков</Filter> | ||
| </ClInclude> | ||
| <ClInclude Include="BalanceBracketsTest.h"> | ||
| <Filter>Файлы заголовков</Filter> | ||
| </ClInclude> | ||
| </ItemGroup> | ||
| </Project> |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,37 @@ | ||||||
| #include "BalanceBracketsTest.h" | ||||||
| #include "BalanceBrackets.h" | ||||||
|
|
||||||
| bool balanceBracketsTest() | ||||||
| { | ||||||
| const char firstCorrectExpressionFromParentheses[250] = "((15 - x) - (13 + 45) * ( 1 0 - 1 6))"; | ||||||
| const char secondCorrectExpressionFromParentheses[250] = "(([(){()}][]{}{}{()}))"; | ||||||
| const char thirdCorrectExpressionFromParentheses[250] = "([[]({})]({}(())))"; | ||||||
| const char fourthCorrectExpressionFromParentheses[250] = "(x * x) * ( c - a)"; | ||||||
| const char fifthCorrectExpressionFromParentheses[250] = "[[]]{{}}(())"; | ||||||
| const char sixthCorrectExpressionFromParentheses[250] = "(({{{}[]}[]}[]))"; | ||||||
| const char seventhCorrectExpressionFromParentheses[250] = "{}()[]"; | ||||||
|
|
||||||
| const char firstIncorrectExpressionFromParentheses[250] = "{{"; | ||||||
| const char secondIncorrectExpressionFromParentheses[250] = "{())[][]}"; | ||||||
| const char thirdIncorrectExpressionFromParentheses[250] = "(x-a)*(c+a))"; | ||||||
| const char fourthIncorrectExpressionFromParentheses[250] = "(]])()()[][]{}{{}}"; | ||||||
| const char fifthIncorrectExpressionFromParentheses[250] = "{()[]{}{{))))))(}"; | ||||||
| const char sixthIncorrectExpressionFromParentheses[250] = "{{}}((("; | ||||||
| const char seventhIncorrectExpressionFromParentheses[250] = "("; | ||||||
|
|
||||||
| return checkCorrectOrderBrackets(firstCorrectExpressionFromParentheses) | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Зачем так мучиться? Можно просто
Suggested change
|
||||||
| && checkCorrectOrderBrackets(secondCorrectExpressionFromParentheses) | ||||||
| && checkCorrectOrderBrackets(thirdCorrectExpressionFromParentheses) | ||||||
| && checkCorrectOrderBrackets(fourthCorrectExpressionFromParentheses) | ||||||
| && checkCorrectOrderBrackets(fifthCorrectExpressionFromParentheses) | ||||||
| && checkCorrectOrderBrackets(sixthCorrectExpressionFromParentheses) | ||||||
| && checkCorrectOrderBrackets(seventhCorrectExpressionFromParentheses) | ||||||
|
|
||||||
| && !checkCorrectOrderBrackets(firstIncorrectExpressionFromParentheses) | ||||||
| && !checkCorrectOrderBrackets(secondIncorrectExpressionFromParentheses) | ||||||
| && !checkCorrectOrderBrackets(thirdIncorrectExpressionFromParentheses) | ||||||
| && !checkCorrectOrderBrackets(fourthIncorrectExpressionFromParentheses) | ||||||
| && !checkCorrectOrderBrackets(fifthIncorrectExpressionFromParentheses) | ||||||
| && !checkCorrectOrderBrackets(sixthIncorrectExpressionFromParentheses) | ||||||
| && !checkCorrectOrderBrackets(seventhIncorrectExpressionFromParentheses); | ||||||
| } | ||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| #pragma once | ||
| #include <stdbool.h> | ||
|
|
||
| // Function for testing a function that checks for the correct position of the brackets | ||
| bool balanceBracketsTest(); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| #include "BalanceBrackets.h" | ||
| #include "../../Stack/Stack/Stack.h" | ||
| #include "BalanceBracketsTest.h" | ||
| #include <stdio.h> | ||
|
|
||
| int main() | ||
| { | ||
| if (!balanceBracketsTest()) | ||
| { | ||
| printf("Test failed"); | ||
| return -1; | ||
| } | ||
| char expressionFromParentheses[250] = { '\0' }; | ||
| printf("enter the expression that you want to check for the correct placement of brackets\n"); | ||
| scanf_s("%[^\n]s", expressionFromParentheses, (unsigned)sizeof(expressionFromParentheses)); | ||
| if (!checkCorrectOrderBrackets(expressionFromParentheses)) | ||
| { | ||
| printf("The balance of the brackets is incorrect"); | ||
| return 0; | ||
| } | ||
| printf("The balance of the brackets is correct"); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| | ||
| Microsoft Visual Studio Solution File, Format Version 12.00 | ||
| # Visual Studio Version 16 | ||
| VisualStudioVersion = 16.0.31410.357 | ||
| MinimumVisualStudioVersion = 10.0.40219.1 | ||
| Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Stack", "Stack\Stack.vcxproj", "{A4F19B27-54C9-4841-98B0-728EDCD283D2}" | ||
| 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 | ||
| {A4F19B27-54C9-4841-98B0-728EDCD283D2}.Debug|x64.ActiveCfg = Debug|x64 | ||
| {A4F19B27-54C9-4841-98B0-728EDCD283D2}.Debug|x64.Build.0 = Debug|x64 | ||
| {A4F19B27-54C9-4841-98B0-728EDCD283D2}.Debug|x86.ActiveCfg = Debug|Win32 | ||
| {A4F19B27-54C9-4841-98B0-728EDCD283D2}.Debug|x86.Build.0 = Debug|Win32 | ||
| {A4F19B27-54C9-4841-98B0-728EDCD283D2}.Release|x64.ActiveCfg = Release|x64 | ||
| {A4F19B27-54C9-4841-98B0-728EDCD283D2}.Release|x64.Build.0 = Release|x64 | ||
| {A4F19B27-54C9-4841-98B0-728EDCD283D2}.Release|x86.ActiveCfg = Release|Win32 | ||
| {A4F19B27-54C9-4841-98B0-728EDCD283D2}.Release|x86.Build.0 = Release|Win32 | ||
| EndGlobalSection | ||
| GlobalSection(SolutionProperties) = preSolution | ||
| HideSolutionNode = FALSE | ||
| EndGlobalSection | ||
| GlobalSection(ExtensibilityGlobals) = postSolution | ||
| SolutionGuid = {5B7E38AF-1E89-49D4-95EB-B55DB0F7ADDF} | ||
| EndGlobalSection | ||
| EndGlobal |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| #include "StackTest.h" | ||
| #include <stdio.h> | ||
|
|
||
| int main() | ||
| { | ||
| if (!pushTest() || !popTest() || !deleteStackTest()) | ||
| { | ||
| printf("Test failed"); | ||
| return -1; | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Кажется, stdlib тут так и не пригодился