Skip to content

Commit eb71cac

Browse files
SLL and DLL Updated
1 parent a9514b2 commit eb71cac

File tree

6 files changed

+270
-67
lines changed

6 files changed

+270
-67
lines changed

.vscode/c_cpp_properties.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"configurations": [
3+
{
4+
"name": "windows-gcc-x64",
5+
"includePath": [
6+
"${workspaceFolder}/**"
7+
],
8+
"compilerPath": "C:/msys64/ucrt64/bin/gcc.exe",
9+
"cStandard": "${default}",
10+
"cppStandard": "${default}",
11+
"intelliSenseMode": "windows-gcc-x64",
12+
"compilerArgs": [
13+
""
14+
]
15+
}
16+
],
17+
"version": 4
18+
}

.vscode/launch.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "C/C++ Runner: Debug Session",
6+
"type": "cppdbg",
7+
"request": "launch",
8+
"args": [],
9+
"stopAtEntry": false,
10+
"externalConsole": true,
11+
"cwd": "c:/Users/abuhu/Desktop/DSA Practice Annual",
12+
"program": "c:/Users/abuhu/Desktop/DSA Practice Annual/build/Debug/outDebug",
13+
"MIMode": "gdb",
14+
"miDebuggerPath": "gdb",
15+
"setupCommands": [
16+
{
17+
"description": "Enable pretty-printing for gdb",
18+
"text": "-enable-pretty-printing",
19+
"ignoreFailures": true
20+
}
21+
]
22+
}
23+
]
24+
}

.vscode/settings.json

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
"C_Cpp_Runner.cCompilerPath": "gcc",
3+
"C_Cpp_Runner.cppCompilerPath": "g++",
4+
"C_Cpp_Runner.debuggerPath": "gdb",
5+
"C_Cpp_Runner.cStandard": "",
6+
"C_Cpp_Runner.cppStandard": "",
7+
"C_Cpp_Runner.msvcBatchPath": "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Auxiliary/Build/vcvarsall.bat",
8+
"C_Cpp_Runner.useMsvc": false,
9+
"C_Cpp_Runner.warnings": [
10+
"-Wall",
11+
"-Wextra",
12+
"-Wpedantic",
13+
"-Wshadow",
14+
"-Wformat=2",
15+
"-Wcast-align",
16+
"-Wconversion",
17+
"-Wsign-conversion",
18+
"-Wnull-dereference"
19+
],
20+
"C_Cpp_Runner.msvcWarnings": [
21+
"/W4",
22+
"/permissive-",
23+
"/w14242",
24+
"/w14287",
25+
"/w14296",
26+
"/w14311",
27+
"/w14826",
28+
"/w44062",
29+
"/w44242",
30+
"/w14905",
31+
"/w14906",
32+
"/w14263",
33+
"/w44265",
34+
"/w14928"
35+
],
36+
"C_Cpp_Runner.enableWarnings": true,
37+
"C_Cpp_Runner.warningsAsError": false,
38+
"C_Cpp_Runner.compilerArgs": [],
39+
"C_Cpp_Runner.linkerArgs": [],
40+
"C_Cpp_Runner.includePaths": [],
41+
"C_Cpp_Runner.includeSearch": [
42+
"*",
43+
"**/*"
44+
],
45+
"C_Cpp_Runner.excludeSearch": [
46+
"**/build",
47+
"**/build/**",
48+
"**/.*",
49+
"**/.*/**",
50+
"**/.vscode",
51+
"**/.vscode/**"
52+
],
53+
"C_Cpp_Runner.useAddressSanitizer": false,
54+
"C_Cpp_Runner.useUndefinedSanitizer": false,
55+
"C_Cpp_Runner.useLeakSanitizer": false,
56+
"C_Cpp_Runner.showCompilationTime": false,
57+
"C_Cpp_Runner.useLinkTimeOptimization": false,
58+
"C_Cpp_Runner.msvcSecureNoWarnings": false,
59+
"files.associations": {
60+
"*.ejs": "html",
61+
"ostream": "cpp"
62+
}
63+
}

DLL.cpp

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
// 4. Delete at Beginning
77
// 5. Delete at End
88
// 6. Searching
9-
// 7. Simple Display
10-
// 8. Reverse Display
9+
// 7. Value Updating
10+
// 8. Simple Display
11+
// 9. Reverse Display
1112

1213
#include<iostream>
1314
#include<string>
@@ -149,6 +150,37 @@ void deleteEnd() {
149150
delete current;
150151
}
151152

153+
// Value Updating
154+
155+
void valueUpdate(int item, int newValue)
156+
{
157+
current = head;
158+
bool updated = false;
159+
160+
while (current != NULL)
161+
{
162+
if (current->data == item)
163+
{
164+
current->data = newValue;
165+
updated = true;
166+
break;
167+
}
168+
else
169+
{
170+
current = current->next;
171+
}
172+
}
173+
174+
if (updated)
175+
{
176+
cout << "Value Updated!" << endl;
177+
}
178+
else
179+
{
180+
cout << "Value not found to be updated!" << endl;
181+
}
182+
}
183+
152184
// Simple display
153185

154186
void display(){

0 commit comments

Comments
 (0)