os-70-350

os-70-350 Commit Details


Date:2013-12-18 23:42:16 (11 years 8 months ago)
Author:Natalie Adams
Branch:master
Commit:d49bb8012a13ebca5f3b5e837b912e850f1bbba5
Parents: 2e1e315e2939be19172ae2bb92843646ba9ffbe1
Message:Fixing build scripts Adding sieve of Eratosthenes example

Changes:

File differences

Sieve_of_Eratosthenes-example/build.bat
1
2
@echo off
call ../vcppbuild.bat main
Sieve_of_Eratosthenes-example/build.sh
1
2
3
4
#!/bin/bash
g++ -o main main.cpp
./main
Sieve_of_Eratosthenes-example/main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include <iostream>
using namespace std;
#define ARRAY_SIZE 32
int main()
{
int arr[ARRAY_SIZE]; // 0 - 31
for(int i = 0; i < ARRAY_SIZE - 1; i++)
{
arr[i] = 2 + i;
}
int index = 0;
while(index < ARRAY_SIZE - 1)
{
if (arr[index] == 0)
{
index += 1;
continue;
}
for (int i = index + arr[index]; i < ARRAY_SIZE - 1; i += arr[index])
{
arr[i] = 0;
}
index += 1;
}
for(int i = 0; i < ARRAY_SIZE - 1; i++)
{
if (arr[i] != 0)
cout << arr[i] << " ";
}
}
cp-Linux/build.sh
11
22
3
3
44
#!/bin/bash
gcc -o main main.cpp
g++ -o main main.cpp
./main
cp-homework/build.sh
11
22
3
3
44
#!/bin/bash
gcc -o main main.cpp
g++ -o main main.cpp
./main
cp/build.sh
11
22
3
3
44
#!/bin/bash
gcc -o main main.cpp
g++ -o main main.cpp
./main test.txt test2.txt
ptypes-tcp/build.sh
11
22
3
4
3
4
#!/bin/bash
gcc -o client -lptypes client.cpp
gcc -o server -lptypes server.cpp
g++ -o client -lptypes client.cpp
g++ -o server -lptypes server.cpp
vcppbuild.bat
1313
1414
1515
16
16
1717
goto compile
)
:compile
cl.exe /Zi /nologo /W3 /WX- /O2 /Ob1 /Oy- /D "_CONSOLE" /D "NDEBUG" /D "WIN32" /D "_VC80_UPGRADE=0x0600" /D "_MBCS" /GF /Gm- /EHsc /MD /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /I"..\ext\include" %1.cpp %2
cl.exe /Zi /nologo /W3 /WX- /O2 /Oi /Oy- /GL /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_UNICODE" /D "UNICODE" /Gm- /EHsc /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /I"..\ext\include" %1.cpp %2
del %1.obj

Archive Download the corresponding diff file

Branches

Number of commits:
Page rendered in 0.11446s using 14 queries.