사용환경 : MinGW (gcc 6.3.0), Eclipse CDT (Oxygen 4.7.0), Windows 10 x64 Eclipse CDT 환경에서 compile한 실행파일을 실행시켰을 때, arguments를 입력하는 방법을 알아보자. 아래와 같이 Program arguments를 입력하면 된다. Run > Run Configurations > Create, manage, and run configurations > Arguments > Program arguments Eclipse에서 Program arguments로 “Hello World”를 입력하고, 아래의 예제 프로그램을 실행시켜보자. #include #include using namespace std; int main(int argc, ..
Visual Studio에서 Command Line Arguments를 입력한 후, 프로그램을 실행해보자. Command Line Arguments는 아래와 같이 입력하면 된다. Project > Properties > Configuration Properties > Debugging > Command Arguments Command Arguments로 Hello World를 입력한 후, 아래 예제 프로그램을 실행해보자. int main(int argc, char *argv[]){ for (int var = 0; var < argc; ++var) { cout
CLion 환경에서 C++ Standard (C++11, C++14, C++17) 설정 방법을 알아보자. CLion 2017.2.2 환경의 경우, 아래와 같이 New Project 생성할 때 Language standard를 선택하면 된다. Start CLion > New Project > Language standard Project 폴더 아래에 있는 CMakeLists.txt 파일 내용을 보면 아래와 같은 부분이 있는데, 이곳에서 원하는 C++ Standard를 지정할 수도 있다. set(CMAKE_CXX_STANDARD 11)
Eclipse 환경에서 C++ Standard (C++11, C++14, C++17) 설정 방법을 알아보자. Eclipse 4.7 Oxygen 환경의 경우, 아래와 같이 Language standard를 선택하면 된다. File > Properties > C/C++ Build > Settings > Tool Settings > Dialect > Language standard 혹은, 아래와 같이 Other flags 입력박스에 원하는 옵션을 입력해도 된다. File > Properties > C/C++ Build > Settings > Tool Settings > Miscellaneous > Other flags
Intel Parallel Studio + Visual Studio 환경에서 C++ Standard (C++11, C++14, C++17) 설정 방법을 알아보자. Intel Parallel Studio XE 2018 + Visual Studio 2017 환경의 경우, 아래와 같이 선택하면 된다. Project > Project Properties > Configuration Properties > C/C++ > Language [Intel C++] > Enable C++11 Support C++14와 C++17의 경우 command line에서 /Qstd=c++14 혹은 /Qstd=c++17 옵션을 직접 입력해 주어야 한다. (이 부분에 대한 불편 사항을 forum에 보고하였다.)
참고 :[Python] platform - Access to underlying platform's identifying data >>> import platform >>> platform.architecture() ('64bit', 'WindowsPE') >>> platform.machine() 'AMD64' >>> platform.platform() 'Windows-10-10.0.17134-SP0' >>> platform.system() 'Windows' >>> platform.version() '10.0.17134' >>> platform.release() '10'
참고 :IsWow64Process functionSYSTEM_INFO structureGetSystemInfo functionGetNativeSystemInfo function // C++ #include #include #include #include using namespace std; int _tmain(int argc, TCHAR *argv[]){ BOOL isWow64 = false; if (IsWow64Process(GetCurrentProcess(), &isWow64) != 0) cout
// C++ #include #include #include // for CString using namespace std; int _tmain(int argc, TCHAR *argv[]){ CString myArchitecture; if (myArchitecture.GetEnvironmentVariable(_T("PROCESSOR_ARCHITECTURE")) != 0) cout
// C++ #include #include #include #include using namespace std; int _tmain(int argc, TCHAR *argv[]){ const DWORD buffSize = 10; LPTSTR buffer1 = new TCHAR[buffSize]; LPTSTR buffer2 = new TCHAR[buffSize]; if (GetEnvironmentVariable(TEXT("PROCESSOR_ARCHITECTURE"), buffer1, buffSize) != 0) cout