-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Lee
committed
Apr 9, 2018
0 parents
commit 6401c24
Showing
13 changed files
with
714 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
{ | ||
"configurations": [ | ||
{ | ||
"name": "Mac", | ||
"includePath": [ | ||
"/usr/include", | ||
"/usr/local/include", | ||
"${workspaceRoot}" | ||
], | ||
"defines": [], | ||
"intelliSenseMode": "clang-x64", | ||
"browse": { | ||
"path": [ | ||
"/usr/include", | ||
"/usr/local/include", | ||
"${workspaceRoot}" | ||
], | ||
"limitSymbolsToIncludedHeaders": true, | ||
"databaseFilename": "" | ||
}, | ||
"macFrameworkPath": [ | ||
"/System/Library/Frameworks", | ||
"/Library/Frameworks" | ||
] | ||
}, | ||
{ | ||
"name": "Linux", | ||
"includePath": [ | ||
"/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5", | ||
"/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5/x86_64-redhat-linux", | ||
"/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5/backward", | ||
"/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include", | ||
"/usr/local/include", | ||
"/usr/include", | ||
"${workspaceRoot}" | ||
], | ||
"defines": [], | ||
"intelliSenseMode": "clang-x64", | ||
"browse": { | ||
"path": [ | ||
"/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5", | ||
"/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5/x86_64-redhat-linux", | ||
"/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5/backward", | ||
"/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include", | ||
"/usr/local/include", | ||
"/usr/include", | ||
"${workspaceRoot}" | ||
], | ||
"limitSymbolsToIncludedHeaders": true, | ||
"databaseFilename": "" | ||
} | ||
}, | ||
{ | ||
"name": "Win32", | ||
"includePath": [ | ||
"C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/include", | ||
"${workspaceRoot}" | ||
], | ||
"defines": [ | ||
"_DEBUG", | ||
"UNICODE", | ||
"_UNICODE" | ||
], | ||
"intelliSenseMode": "msvc-x64", | ||
"browse": { | ||
"path": [ | ||
"C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/include/*", | ||
"${workspaceRoot}" | ||
], | ||
"limitSymbolsToIncludedHeaders": true, | ||
"databaseFilename": "" | ||
} | ||
} | ||
], | ||
"version": 3 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
// https://github.com/Microsoft/vscode-cpptools/blob/master/launch.md | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "(gdb) Launch", | ||
"type": "cppdbg", | ||
"request": "launch", | ||
"program": "${workspaceFolder}/a.out", | ||
"args": [], | ||
"stopAtEntry": false, | ||
"cwd": "${workspaceFolder}", | ||
"environment": [], | ||
"externalConsole": true, | ||
"MIMode": "gdb", | ||
"setupCommands": [ | ||
{ | ||
"description": "Enable pretty-printing for gdb", | ||
"text": "-enable-pretty-printing", | ||
"ignoreFailures": true | ||
} | ||
], | ||
//"internalConsoleOptions": "neverOpen", | ||
"preLaunchTask": "main", | ||
"additionalSOLibSearchPath": "" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"files.associations": { | ||
"iostream": "cpp", | ||
"ostream": "cpp", | ||
"cmath": "cpp", | ||
"climits": "cpp", | ||
"cfloat": "cpp" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
// See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
// for the documentation about the tasks.json format | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "main", | ||
"type": "shell", | ||
"command": "g++", | ||
"args": [ | ||
"-g", | ||
"-std=c++11", | ||
"-Wall", | ||
"main.cpp" | ||
], | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
}, | ||
"problemMatcher": [] | ||
} | ||
] | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
#include <iostream> | ||
#include <cmath> | ||
#include <climits> | ||
#include <cfloat> | ||
|
||
using namespace std; | ||
|
||
int climits_test(void); | ||
int cPlusPlus_init(void); | ||
int flaotnum(void); | ||
|
||
int main() | ||
{ | ||
cout.setf(ios_base::fixed, ios_base::floatfield); | ||
|
||
//long a = 11111111111111; | ||
const int b = 1; | ||
int a = 2000; | ||
char c = {a}; | ||
cout << "a + b = " << c << endl; | ||
|
||
|
||
//flaotnum(); | ||
//climits_test(); | ||
//cPlusPlus_init(); | ||
|
||
cin.get(); | ||
return 0; | ||
} | ||
|
||
int climits_test(void) | ||
{ | ||
char n_char = CHAR_BIT; | ||
int n_int_max = INT_MAX; | ||
int n_int_min = INT_MIN; | ||
|
||
cout << "sizeof (n_char): " << sizeof (n_char) << endl; | ||
cout << "CHAR_BIT: " << CHAR_BIT << endl; | ||
|
||
cout << "sizeof (short): " << sizeof (short) << endl; | ||
//cout << "SHORT_MAX: " << SHORT_MAX << endl; | ||
|
||
cout << "sizeof (n_int_max): " << sizeof n_int_max << endl; | ||
cout << "INT_MAX: " << INT_MAX << endl; | ||
|
||
cout << "sizeof (n_int_min): " << sizeof (n_int_min) << endl; | ||
cout << "INT_MIN: " << INT_MIN << endl; | ||
|
||
cout << "sizeof (long): " << sizeof (long) << endl; | ||
cout << "LONG_MAX: " << LONG_MAX << endl; | ||
|
||
return 0; | ||
} | ||
|
||
int cPlusPlus_init(void) | ||
{ | ||
int a = {}; | ||
int b = {5}; | ||
int c{}; | ||
|
||
cout << "a: " << a << endl | ||
<< "b: " << b << endl | ||
<< "c: " << c << endl; | ||
return 0; | ||
} | ||
|
||
int flaotnum(void) | ||
{ | ||
using namespace std; | ||
cout.setf(ios_base::fixed, ios_base::floatfield); | ||
float tub = 10.0 / 3.0; | ||
double mint = 10.0 / 3.0; | ||
const float million = 1.0e6; | ||
|
||
cout << "tub = " << tub; | ||
cout << ", amillion tub = " << million * tub; | ||
cout << ", \nand ten million tube = " << 10 * million * tub; | ||
cout << "\nmint = " << mint << " and a million minte = "; | ||
cout << million * mint << endl; | ||
return 0; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
{ | ||
"configurations": [ | ||
{ | ||
"name": "Mac", | ||
"includePath": [ | ||
"/usr/include", | ||
"/usr/local/include", | ||
"${workspaceRoot}" | ||
], | ||
"defines": [], | ||
"intelliSenseMode": "clang-x64", | ||
"browse": { | ||
"path": [ | ||
"/usr/include", | ||
"/usr/local/include", | ||
"${workspaceRoot}" | ||
], | ||
"limitSymbolsToIncludedHeaders": true, | ||
"databaseFilename": "" | ||
}, | ||
"macFrameworkPath": [ | ||
"/System/Library/Frameworks", | ||
"/Library/Frameworks" | ||
] | ||
}, | ||
{ | ||
"name": "Linux", | ||
"includePath": [ | ||
"/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5", | ||
"/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5/x86_64-redhat-linux", | ||
"/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5/backward", | ||
"/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include", | ||
"/usr/local/include", | ||
"/usr/include", | ||
"${workspaceRoot}" | ||
], | ||
"defines": [], | ||
"intelliSenseMode": "clang-x64", | ||
"browse": { | ||
"path": [ | ||
"/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5", | ||
"/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5/x86_64-redhat-linux", | ||
"/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5/backward", | ||
"/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include", | ||
"/usr/local/include", | ||
"/usr/include", | ||
"${workspaceRoot}" | ||
], | ||
"limitSymbolsToIncludedHeaders": true, | ||
"databaseFilename": "" | ||
}, | ||
"compilerPath": "/usr/bin/gcc", | ||
"cStandard": "c11", | ||
"cppStandard": "c++14" | ||
}, | ||
{ | ||
"name": "Win32", | ||
"includePath": [ | ||
"C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/include", | ||
"${workspaceRoot}" | ||
], | ||
"defines": [ | ||
"_DEBUG", | ||
"UNICODE", | ||
"_UNICODE" | ||
], | ||
"intelliSenseMode": "msvc-x64", | ||
"browse": { | ||
"path": [ | ||
"C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/include/*", | ||
"${workspaceRoot}" | ||
], | ||
"limitSymbolsToIncludedHeaders": true, | ||
"databaseFilename": "" | ||
} | ||
} | ||
], | ||
"version": 3 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
// https://github.com/Microsoft/vscode-cpptools/blob/master/launch.md | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "(gdb) Launch", | ||
"type": "cppdbg", | ||
"request": "launch", | ||
"program": "${workspaceFolder}/a.out", | ||
"args": [], | ||
"stopAtEntry": false, | ||
"cwd": "${workspaceFolder}", | ||
"environment": [], | ||
"externalConsole": true, | ||
"MIMode": "gdb", | ||
"setupCommands": [ | ||
{ | ||
"description": "Enable pretty-printing for gdb", | ||
"text": "-enable-pretty-printing", | ||
"ignoreFailures": true | ||
} | ||
], | ||
//"internalConsoleOptions": "neverOpen", | ||
"preLaunchTask": "main", | ||
"additionalSOLibSearchPath": "" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"files.associations": { | ||
"iostream": "cpp", | ||
"ostream": "cpp", | ||
"cmath": "cpp", | ||
"climits": "cpp", | ||
"cfloat": "cpp", | ||
"array": "cpp", | ||
"istream": "cpp" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
// See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
// for the documentation about the tasks.json format | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "main", | ||
"type": "shell", | ||
"command": "g++", | ||
"args": [ | ||
"-g", | ||
"-std=c++11", | ||
"-Wall", | ||
"main.cpp" | ||
], | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
}, | ||
"problemMatcher": [] | ||
} | ||
] | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Make and model! |
Oops, something went wrong.