Hello, we have a problem with our applications. We have recently upgraded our toolchain to Visual Studio 2010 and friends, it all works fine on Windows Vista + Windows 7 developer machines and Windows 7 customer machines. (all x86)
Today we did a first installation to a client PC running Windows XP SP2 x86, and all applications linking ...
Hi there,
I want to read a file as fast as possible (40k lines) [Edit : the rest is obsolete].
Edit: Andres Jaan Tack suggested a solution based on one thread per file, and I want to be sure I got this (thus this is the fastest way) :
One thread per entry file reads it whole and stocks its content in a container associated (-> as ma...
Is it possible to call CLR DLL (one for example which is made with C#) from Undamaged C++ code?
I need a DLL that is not managed to call into it somehow, maybe even via some proxy C++ process that is built with C++ / CLI?
...
The first solution is:
std::vector<int> *vec = new std::vector<int>;
assert(vec != NULL);
// ...
delete vec;
An alternative is:
std::vector<int> v;
//...
vec.clear();
vec.swap(std::vector<int>(vec));
The second solution's a bit of a trick --- what's the "right" way to do it?
Update:
I'm aware that the destructor will be called on...
I am building an RDP client and I have toolbar that shows the running applications, same as the Windows toolbar. I need to support dual monitors, so my questions are 1) How do I detect that there is more than one monitor and 2) Is there a formula for calculating the width of the icons on the toolbar?
I know that at the start, the width...
I have a very large binary file and I need to create separate files based on the id within the input file. There are 146 output files and I am using cstdlib and fopen and fwrite. FOPEN_MAX is 20, so I can't keep all 146 output files open at the same time. I also want to minimize the number of times I open and close an output file.
How ...
Hello,
I need to develop an iPhone/iPod Touch application that creates a server to send some data stream (characters or bytes) to a Windows C++ application via Bluetooth. I'm thinking of creating a TCP connection, but don't know where to start.
What iPhone API should I use do to something like this? Does anyone knows some code examples...
I was asked this crazy question.
I was out of my wits.
Can a method in base class which is declared as virtual be called using the base class pointer which is pointing to a derived class object?
Is this possible?
...
Is it possible to create a modifiable string literal in C++? For example:
char* foo[] = {
"foo",
"foo"
};
char* afoo = foo[0];
afoo[2] = 'g'; // access violation
This produces an access violation because the "foo"s are allocated in read only memory (.rdata section I believe). Is there any way to force the "foo"s into writable ...
Hey everyone,
I was wondering, how would I combine recorded audio and video into one if I have them in separate files? Preferably using OpenCV and PortAudio/libsnd.
Thanks in advance.
...
If a std::set or std::list contains a sequence of natural numbers (1, 2, 3..). would there be a function in standard library to find the missing number?
...
Hey, I'm a real gcc newbee so excuse me if this is a silly question.
I want to use opencv in android and therefore try to compile it into a static library that get's used in the android ndk build process to build a shared library that I intent to use for my android app. The build of the statc library works fine, but when building the sh...
Possible Duplicate:
Templates: template function not playing well with classs template member function
template <typename T>
struct A
{
template <int I>
void f();
};
template <typename T>
void F(A<T> &a)
{
a.f<0>(); // expected primary-expression before ‘)’ token
}
int main()
{
A<int> a;
a.f<0>(); // Thi...
I'm working on a init for an initramfs in C++ for Linux. This script is used to unlock the DM-Crypt w/ LUKS encrypted drive, and set the LVM drives to be available.
Since I don't want to have to reimplement the functionality of cryptsetup and gpg I am using system calls to call the executables. Using a system call to call gpg works fi...
I would like to use an xml format similar to the following:
<CONFIG>
<PROFILE NAME="foobar">
<PARAM ID="0" NAME="Foo" CLASS="BaseParam"/>
<PARAM ID="2" NAME="Bar" CLASS="StrIntParam">
<VALUE TYPE="STRING">some String</VALUE>
<VALUE TYPE="INT">1234</VALUE>
</PARAM>
</PROFILE>
</CONFIG>
CONFIG contains a list...
I've been comparing various audio libraries available in C++. I was wondering, I'm kind of stuck starting with OpenAL. Can someone point out an example program how to record from a mic using OpenAL in C++.
Thanks in advance!
...
I remember hearing that the following code is not C++ compliant and was hoping someone with much more C++ legalese than me would be able to confirm or deny it.
std::vector<int*> intList;
intList.push_back(new int(2));
intList.push_back(new int(10));
intList.push_back(new int(17));
for(std::vector<int*>::iterator i = intList.begin(); i ...
int *pi = new int(0);
What's the significance of 0 here? Does it mean integer array of length 0?
...
Received an unmanaged C++ dll with instance functions which need to be called from my C#. need to write a wrapper C++ dll to bridge the C# and original C++ dll as suggested by experts here. it is new to me and want to learn from you.
Header file of the original C++ dll likes this:
class EXPORT_MACRO NB_DPSM
{
private:
string sFi...
A simple find/replace will not work for code commented out like this:
ex:
/* templine1
templine2
templine3 */
Got any ideas?
...