I have been looking into Rake for build script in our CI system (Projects built with C++). I have been playing about with a simple 'hello world' application to see what rake is capable of doing. All was well until i decided to put the .h files into a include folder and the .cpp files into src folder. Rake was able to find the .cpp files ...
This was an actual interview question. o_O
Let's leave aside the issues of asking such a question in an interview.
I'm wondering what alternatives to the ol' TCP sockets approach are readily available (as libraries, for instance), for use in C or C++.
I'm making no assumptions on platform, compiler etc - take your pick.
I'm not as...
I'm wondering how mature and stable D is, and if it might be a good replacement for C/C++.
I know that there are currently two standard libraries (Phobos and Tango), so I assume that there might be people trying to unify them.
Additionally I heard some time ago that the languages has problems on the boundaries of GCed/non-GCed code. I ...
this is from opencv hough lines, can any one explain me, after changing it tio cartesian
WHY THEY ADDED a+1000, -b*1000
#include <cv.h>
#include <highgui.h>
#include <math.h>
int main(int argc, char** argv)
{
IplImage* src;
if( argc == 2 && (src=cvLoadImage(argv[1], 0))!= 0)
{
IplImage* dst = cvCreateImage( cvGetSi...
Hello
I'd like to use the following idiom, that I think is non-standard. I have functions which return vectors taking advantage of Return Value Optimization:
vector<T> some_func()
{
...
return vector<T>( /* something */ );
}
Then, I would like to use
vector<T>& some_reference;
std::swap(some_reference, some_func());
but so...
I would like to know what's the process, when binding C++ libraries that are written with in a generic way.
Is there a posibility of binding a template class, or you can only bind only a template generated class ?
...
What's the best way to store the following message into a data structure for easy access?
"A=abc,B=156,F=3,G=1,H=10,G=2,H=20,G=3,H=30,X=23.50,Y=xyz"
The above consists of key/value pairs of the following:
A=abc
B=156
F=3
G=1
H=10
G=2
H=20
G=3
H=30
X=23.50
Y=xyz
The tricky part is the keys F, G and H. F indicates the number of items i...
Possible Duplicate:
Is <value optimized out> in gdb a problem?
Hi,
I am still learning advanced c++ programming. I am getting segmentation fault in my C++ code. While using gdb, the point of failure is during de-allocation with one of the parameters to the de-allocator(malloc) is a value that is optimized out(av=value optimiz...
I like to compile my code with -Wall, and sometimes even -pedantic. It's partly a style thing, and partly the fact that it does occasionally emit very, very useful warnings (such as using = rather than ==).
However, the writers of some of my headers are clearly not such sticklers. Compiling with either of the two warning levels yields ...
I would like to display the explicit path to a library which will be used in the linking stage of compilation. I want to do this so that I can add the library as a dependency to a separate object file.
In other words, I often link using:
g++ myFile.cpp -Lsomewhere -Lelse -Lhere -Lthere -lfoo
Is there a way to coerce g++, ld, ldd, or ...
Hi
We have a unmanaged C++ TCP server application running as a Windows service that is silently crashing after few days of run on Win2003 server. There is no Dr. Watson log file getting generated (no issue with Dr. Watson log as it catches other crashes in same application). Due to lack of Dr. Watson log file, we are unable to progress ...
Dear Sirs,
On XP, if you go to
control panel -> regional and language Options -> Languages Tab -> Details ->
If you have more than one keyboard in use, then, click Key Settings. Those are the settings I would like to change. I would like to set it up so that the DVORAK keyboard is Left Alt + Shift + 1. I can use C++, C# or wha...
hi
How can I go about determining return type of a member generic function?
template<class E>
struct result<E> {
// E has member function data(), I need to know its return type
typedef typename &E::data type;
};
is it possible to do it in generic way?
I know there is boost:: result_of but for my purposes i...
Hello,
This seems like such a basic question, so I apologize if it's already been answered somewhere (my searching didn't turn up anything).
I just want to filter a string object so that it contains only alphanumeric and space characters.
Here's what I tried:
#include "boost/algorithm/string/erase.hpp"
#include "boost/algorithm/strin...
Edit :
Fixed, the issue was with the spawned EXE that did not handle the parameters properly (perl script that was byte compiles)
Thanks again.
Max.
(probable duplicate of http://stackoverflow.com/questions/1135784/createprocess-doesnt-pass-command-line-arguments)
Is there a difference between passing an argument vs. passing a par...
I have a C++/ATL COM server that implements IConnectionPoint events. My client is a C# application that attaches to the events. When the COM server is created as a SYSTEM service, the client can properly attach to the event. When the COM server is created as a LocalService service (preferred), then I get an E_ACCESSDENIED exception wh...
So is this even possible? If i some day wanted to sprintf(str, "%doodle %d", var); output "%doodle 123" and not "123oodle", how can i stop the first %d from being processed?
...
I'm compiling using Code::Blocks on Windows 7 using the MinGW compiler (which I can only assume is the latest version; both Code::Blocks and MinGW were installed this past week). My issue crops up under a particular circumstance, and my attempts to write a simpler script that demonstrates the problem have failed (which implies that there...
I am currently trying to authenticate users in a c++ application in Windows. I need to display a dialog for username and password and verify that they are an authenticated user on the Windows machine. Are there any libraries that allow for this functionality or a good way to go about it?
...
Hi,
I came across this article on Code Project that talks about using an abstract interface as an alternative to exporting an entire class from a C++ DLL to avoid name mangling issues. The author has a Release() method in his interface definition that is supposed to be called by the user to free the class object's resources after using i...