As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Hi I have a C++ project with several executable and lots of code.
Each executable is equivalent to a single brick in my algorithms chain but common parameters are needed by different executables. I would like to store these params but how to do this properly.
Thanks.
Some possibilities for you to consider:
Environment variables
An XML file
Using a database
It's hard to provide more specific guidance without knowing more.
Assuming MS Visual Studio : Select the projects which need the common parameters in the Solution explorer and choose properties (alt-enter) goto the run-parameters and give values and save.
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I apologize to take a topic which is widely discussed before - but I find none of the discussions clearly tell which one to use ultimately. My requirements for a logging framework in my C++ project are
Thread safe.
Should support multiple targets.
Log rotation possible.
A way to identify module's implicitly.
I have been using boost log for some time in a small c++ project and it worked well. But when I took to a large C++ project - I found supporting multiple targets(I mean multiple files for the same project) is a nightmare, No way to implicitly mention which module is logging and above all the compile time has increased at-least 40%.
Now I am looking at alternate framework and think log4cplus and logog seems fill all my requirements. Wanted to get an expert opinion on which would suit the above criteria rather than getting in a soup again after using the library for some time.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
What are recommendation on C++ logging library/framework with full control over it. I want to be able to have a full control over where logs are stored, what information to produce and show/hide without having compilation errors. I have tried log4cxx and log4cplus but they dont have complete control over logging.
I use GLog for some projects. It works quite well. It has many features that allow you to control different aspects of logging.
There is Boost.Log. However, as the site says, it is not officially part of Boost. It did conditionally pass review, but there are some heavy duty fixes suggested. It is a shame as I like to get as much as I can from Boost for consistency.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
How could I embed or associate an .exe into an ordinary file, like .jpeg or any video etc.
? I want to associate the opening of the ordinary file with the execution of an executable program.
What you're trying to do is intended not to be possible. If and when it does happen, it takes place by exploiting a flaw in the program reading the file. This might take place (this is more common when the program is written in C or C++) by storing out-of-range values in the headers and hoping the program does not validate them before using them as offsets in memory, or (this is more common in higher-level languages) by taking advantage of a logical error in some overgrown feature the format intentionally allows (like embedding javascript).
Beyond this, I think any further answer is off-topic on SO. This is not a site for getting help writing malware.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I have started to port a project which involves C++, qt , MySql codes.These codes are written for Linux and I am porting them to Windows. So my question, are there any general points to be kept in mind while porting these codes from Linux to Windows? Please help me out here.
I am working on a sililar project, and what I have noted thus far is that the path names are different from Unix to Windows, the header files are not exactly the same between the two, and the size of variables are sometimes different. Here are some useful links as well:
http://www.willydev.net/descargas/prev/UNIX.pdf
http://suacommunity.com/dictionary/index.php
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
Are there some cases where it may not be a good idea to use the code of an open source project even though your company might allow you to do so?
Some cases that I think might be valid are:
The code may be implemented in a different languages.
It is not portable
It may need some other close-source libraries
What might be some other reasons?
Yes, some open-source licenses may require you to expose your source code, e.g GPL.
http://encodable.com/tech/blog/2006/02/25/Why_the_GPL_is_Incompatible_with_Commercial_Software
When security is involved and you do not have access to the actual code so you never (truly) know what you are using.
Beta code may not be appropriate in a production system.
if the library has a web page and there hasn't been any activity on it for a long long time. Either the code is perfect or no one is looking at the code anymore and no bug fixes are being applied.