os-70-350

os-70-350 Commit Details


Date:2013-12-04 21:49:12 (11 years 9 months ago)
Author:Natalie Adams
Branch:master
Commit:655a6325afef24550e1b2890be5d6d9319a804cf
Parents: 9910a3f67edc2abbde521e1e5a84a11b5160eda3
Message:Adding basis for cp API

Changes:

File differences

cp-homework/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
35
#ifdef __linux__
#include <unistd.h> // read, write
#include <errno.h> // ENOENT
#include <fcntl.h> // O_RDONLY and O_WRONLY
#else
// assume any other platform is Windows
#include <Windows.h>
#endif
class FileWrapper
{
#ifdef __linux__
private:
// ... Linux FileWrapper code goes here
#else
private:
// ... Windows FileWrapper here
#endif
}
void cp(const char * src, const char * dest)
{
char buffer[20];
#ifdef __linux__
// Linux code goes here
#else
// Windows code goes here
#endif
}
int main()
{
// Don't ask user for file
cp("test.txt", "test2.txt");
}

Archive Download the corresponding diff file

Branches

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