visual-c++-2010

Should I add .vcxproj.filter files to source control?

冷暖自知 提交于 2019-12-03 02:53:19
问题 While evaluating Visual Studio 2010 Beta 2, I see that in the converted directory, my vcproj files became vcxproj files. There are also vcxproj.filter files alongside each project which appear to contain a description of the folder structure (\Source Files, \Header Files, etc.). Do you think these filter files should be kept per-user, or should they be shared across the whole dev group and checked into SCC? My current thinking is to check them in, but I wonder if there are any reasons not to

Should I add .vcxproj.filter files to source control?

最后都变了- 提交于 2019-12-02 16:26:47
While evaluating Visual Studio 2010 Beta 2, I see that in the converted directory, my vcproj files became vcxproj files. There are also vcxproj.filter files alongside each project which appear to contain a description of the folder structure (\Source Files, \Header Files, etc.). Do you think these filter files should be kept per-user, or should they be shared across the whole dev group and checked into SCC? My current thinking is to check them in, but I wonder if there are any reasons not to do that, or perhaps good reasons why I should definitely check them in. The obvious benefit is that the

How to build boost::mpi library with Open MPI on Windows with Visual Studio 2010

若如初见. 提交于 2019-12-02 08:26:53
问题 I installed Open MPI 1.5.4 (64 bit) and I am trying to rebuild boost libraries (1.48) with bjam. I changed user-config.jam file, by adding using mpi line with explicit compiler path (although mpic++ is already in PATH environment variable): using mpi : "C:/Program Files (x86)/OpenMPI_v1.5.4-x64/bin/mpic++.exe" ; Then I tried to run from command prompt the following command: bjam toolset=msvc --build-type=complete --with-mpi --address-model=64 stage Unfortunately, the build process still needs

How to build boost::mpi library with Open MPI on Windows with Visual Studio 2010

久未见 提交于 2019-12-02 05:22:34
I installed Open MPI 1.5.4 (64 bit) and I am trying to rebuild boost libraries (1.48) with bjam. I changed user-config.jam file, by adding using mpi line with explicit compiler path (although mpic++ is already in PATH environment variable): using mpi : "C:/Program Files (x86)/OpenMPI_v1.5.4-x64/bin/mpic++.exe" ; Then I tried to run from command prompt the following command: bjam toolset=msvc --build-type=complete --with-mpi --address-model=64 stage Unfortunately, the build process still needs more hints. Part of the error reporting looks like: MPI auto-detection failed: unknown wrapper

Very large array on the heap (Visual C++)

丶灬走出姿态 提交于 2019-12-02 02:27:35
I hope some one can help me, i'm trying to create an int[400000000] (400 millions) array on my application using visual c++ 2010 but it generates an overflow error The same code runs on linux with g++. I need this because i'm working with large matrices. Thank you in advance. If you are using a 32-bit application then by default you have just 2GB of user address space. 400 million integers is about 1.5GB. You are very likely not to have this much contiguous address space. It is possible to force 32-bit windows to allocate a 3GB user address space for each process but this may just be a stop

std::vector of std::function

£可爱£侵袭症+ 提交于 2019-12-02 01:32:12
问题 I have the following: typedef std::function<void(const EventArgs&)> event_type; class Event : boost::noncopyable { private: typedef std::vector<event_type> EventVector; typedef EventVector::const_iterator EventVector_cit; EventVector m_Events; public: Event() { }; // eo ctor Event(Event&& _rhs) : m_Events(std::move(_rhs.m_Events)) { }; // eo mtor // operators Event& operator += (const event_type& _ev) { assert(std::find(m_Events.begin(), m_Events.end(), _ev) == m_Events.end()); m_Events.push

std::vector of std::function

隐身守侯 提交于 2019-12-01 20:48:21
I have the following: typedef std::function<void(const EventArgs&)> event_type; class Event : boost::noncopyable { private: typedef std::vector<event_type> EventVector; typedef EventVector::const_iterator EventVector_cit; EventVector m_Events; public: Event() { }; // eo ctor Event(Event&& _rhs) : m_Events(std::move(_rhs.m_Events)) { }; // eo mtor // operators Event& operator += (const event_type& _ev) { assert(std::find(m_Events.begin(), m_Events.end(), _ev) == m_Events.end()); m_Events.push_back(_ev); return *this; }; // eo += Event& operator -= (const event_type& _ev) { EventVector_cit cit

Type of unsigned long is different from uint32_t and uint64_t on Windows (VS2010)

孤者浪人 提交于 2019-12-01 17:32:25
On Visual Studio 2010 under Windows 7, 32bit, unsigned long seems to be a distinct type from both uint32_t and uint64_t. See the following test program: #include <stdint.h> #include <stdio.h> template<class T, class U> struct is_same_type { static const bool value = false; }; template<class T> struct is_same_type<T, T> { static const bool value = true; }; #define TO_STRING(arg) TO_STRING_IMPL(arg) #define TO_STRING_IMPL(arg) #arg #define PRINT_SAME_TYPE(type1, type2) printf("%s (size=%d) %s %s (size=%d)\n", \ TO_STRING(type1), int(sizeof(type1)), \ is_same_type<type1, type2>::value ? "==" : "!

Type of unsigned long is different from uint32_t and uint64_t on Windows (VS2010)

若如初见. 提交于 2019-12-01 16:58:15
问题 On Visual Studio 2010 under Windows 7, 32bit, unsigned long seems to be a distinct type from both uint32_t and uint64_t. See the following test program: #include <stdint.h> #include <stdio.h> template<class T, class U> struct is_same_type { static const bool value = false; }; template<class T> struct is_same_type<T, T> { static const bool value = true; }; #define TO_STRING(arg) TO_STRING_IMPL(arg) #define TO_STRING_IMPL(arg) #arg #define PRINT_SAME_TYPE(type1, type2) printf("%s (size=%d) %s

How do i get the screen to pause? [duplicate]

依然范特西╮ 提交于 2019-12-01 02:00:25
Possible Duplicate: How to stop C++ console application from exiting immediately? So im learning c++ and i was given this example and i wanted to run it. But i cannot get it to stay up, unless i change it. How do i get Microsoft visual 2010 to keep up the screen when it gets to the end of the program after I release it? #include<iostream> using namespace std; int area(int length, int width); /* function declaration */ /* MAIN PROGRAM: */ int main() { int this_length, this_width; cout << "Enter the length: "; /* <--- line 9 */ cin >> this_length; cout << "Enter the width: "; cin >> this_width;