Skip to content

Commit 329725d

Browse files
committed
feat (scripts):Adds a run.sh script file
1 parent 47e61bd commit 329725d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

scripts/run.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
# Compile the a.cpp file
4+
g++ -std=c++17 -Wall -Wextra -O2 a.cpp -o a.out
5+
6+
# Check if the compilation was successful
7+
if [ $? -eq 0 ]; then
8+
echo "Compilation successful. Running a.out..."
9+
# Execute the a.out file
10+
./a.out
11+
else
12+
echo "Compilation failed. Please check your code."
13+
fi

0 commit comments

Comments
 (0)