Forcing non-cached gethostbyname()
Hi. Is there any way to prevent the gethostbyname() function not to read the nscd cache on Linux? Thanks in advance! ...
Hi. Is there any way to prevent the gethostbyname() function not to read the nscd cache on Linux? Thanks in advance! ...
Does anyone know of a library that offers something similar to .NET's Parse/TryParse for dates and times that can be used on Linux from C++? I've looked at the Boost date/time code but I'm not sure that I can do it without specifying the particular input format before attempting to parse. Basically, I might have dates in any number o...
I'm writing a small read-only FTP-like server. Client says "give me that file" and my server sends it. Is there any standard way (a library function?!?) to make sure that the file requested is not "../../../../../etc/passwd" or any other bad thing? It would be great if I could limit all queries to a directory (and its subdirectories). ...
Hi all, my question today is pretty simple: why can't the compiler infer template parameters from class constructors, much as it can do from function parameters? For example, why couldn't the following code be valid: template<typename obj> class Variable { obj data; public: Variable(obj d) { ...
The main reason to use C++ over a managed language these days is to gain the benefits C++ brings to the table. One of the pillars of C++ is "you don't pay for what you don't need". It can be argued though that sometimes you don't want to pay for backward compatibility with C. Many of the odd quirks of C++ can be attributed to this backwa...
Hello, I have trouble developing an OpenGL application. The weird thing is that me and a friend of mine are developing a 3d scene with OpenGL under Linux, and there is some code on the repository, but if we both checkout the same latest version, that means, the SAME code this happens: On his computer after he compiles he can see the ful...
I am looking to build a medical solution to be used by surgeons to visualize Dicom images in 3D. Also, the software will allow them to perform some segmentation and manipulation to the images. I will probably use the VTK package www.vtk.org/ to assist with this project. Now, I am wondering whether it is easier and better to do this pr...
HI I have creted an exe by c++ using visualstudio. I have creted a com componet which discover all the instances of sqlserver on particular machine.now in c++ program using visualstudio i write main() and consume the com component. Now it should worrk on my both workstations which are w2k3 machines.And when i try to run the same on w2...
I guess the question says it all. I want to fork on windows. What is the most similar operation and how do I use it. ...
I have a static library that I want to distribute that has includes Foo.c/h and someone picks it up and includes my static library in their application. Say they also have Foo.c/h in their application. Will they have linking errors? ...
My priority queue declared as: std::priority_queue<*MyClass> queue; class MyClass { bool operator<( const MyClass* m ) const; } is not sorting the items in the queue. What is wrong? I would not like to implement a different (Compare) class. Answer summary: The problem is, the pointer addresses are sorted. The only way to avoid...
Hi all! I have implemented a shared library in Linux and try to test it, but I get an error "undefined reference to `CEDD(char*)'". I use Eclipse with following parameters: Path to include files (here is everything ok) Path to the library and its name. Path is correct and the name is WISE_C (full name: libWISE_C.so) My Code: Test...
How to encrypt a data using symbian C++, so that i can decrypt the same data using java Thanks Sunil ...
We would like to make our C++ brace style more consistent. Right now, our code contains a mix of: if (cond) { // ... } else { // ... } ...and: if (cond) { // ... } else { // ... } We want to use the latter style exclusively. However, we don't want to change the indentation of our code. I've tried using astyle,...
The Problem: I am trying to extract a valid game mode for Defense of the Ancients (DotA) from a game name using C++. Details: Game names can be, at most, 31 characters long There are three game mode categories: primary, secondary, and miscellaneous There can only be 1 primary game mode selected Certain primary game modes are incompat...
I see this in the standard C++ libraries for my system, as well as some of the headers in a library I'm using. What are the semantics of these two definitions? Is there a good reference for #defines like this other than the source itself? ...
I need to write a Windows XP/Vista application, main requirements: Just one .exe file, without extra runtime, like Air, .Net; posstibly a couple of dlls. Very small file size. The application is for network centric usage, similar to ICQ or Gtalk clients. ...
When I connect a library to my program, Eclipse doesn't generate any executable file, I get only an object file. When I disconnect the library from my program (delete all paths and library functions), I get an executable. However, I don't get any error in the first case. What is going wrong? I work with: Linux, C, Eclipse. Log: ** ...
Hello there, I had a routine that was performing good. However, I had to make a change to it. The change improved the routine's precision but hurt the performance. The routine is lots of math calculations and is probably CPU bond (I still have to do more rigorous testing on this, but I'm 99% sure). It is written in C++ (compiler is Bor...
Assume that you work only in the C++ world (cross-language interop is not required). What advantages/inconvenients do you see in using COM instead of a plain basic DLL? Do you think using COM is worth the trouble if you are not going to use the interface from different languages? ...