When I call an unmanaged C++ code from my C# code, I seem to have some kind of a memory leak.
The C++ reads data from a file using ifstream.read, and writes it to a Vector.
This happens only after upgrading to Windows 7, doesn't happen on Vista, but if I use a version of the native dll that was compiled on Vista, it doesn't change anyth...
I'm looking for a way to reliably determine whether C++ code is being compiled in 32 vs 64 bit. We've come up with what we think is a reasonable solution using macros, but was curious to know if people could think of cases where this might fail or if there is a better way to do this. Please note we are trying to do this in a cross-platfo...
Hi!
I need to get the result from pow(a,b) as an integer (both a and b are integers too). currently the calculations where (int) pow( (double)a, (double)b) is included are wrong. Maybe someone can help with a function that does the pow(a,b) with integers and returns an integer too?
But here is the odd part: I made my script in Linux wi...
Hi!
I have an IP address in char type Like char ip = "192.123.34.134" I want increment the last value (134). Does anyone how should i do it? I think, i should convert it to an integer, and then back, but unfortunately i don't know how? :( I'm using C++.
Please help me!
Thanks, kampi
...
How does one create and launch process (i.e. launch an .exe file) with RAM limitation using c++ and the win32 API?
Which error code will be returned, if the proccess goes beyond the limit?
...
I'm learning c++ and writing a binary search tree. The following is the code I wrote for my insert method.
BSTNode * BST::Insert(const std::string & v) {
BSTNode *n = !root ? root = new BSTNode(v) : Insert_Helper(v,root);
if(n) size++;
return n;
}
BSTNode * BST::Insert_Helper(const std::string & v, BSTNode *n) {
if(!n->value.compar...
In java debugging a hung application is easy. You can take the memory dump of the application and use and use eclipse jvm dump analyser to see the status of the threads and where each threads were blocked?
Does something like this exists for C++?
...
Hi all
do you guys know of any programs which can be used to visualize error messages from gcc.
I am imagining something which will allow interactively to collapse all those long template typenames, color code different parts of the error message and what not.
...
class scanner
{
private:
string mRootFilePath;
static int AddToIndex( const char *,const struct stat *,int);
public:
scanner(string aRootFilePath){
mRootFilePath = aRootFilePath;
}
string GetFilepath(){
return mRootFilePath;
}
...
This is the specific error I am getting:
libFoo.so: undefined reference to `IID_IFOOBAR'
collect2: ld returned 1 exit status
make: *** [/home/F.exe] Error 1
when I try to check the symbols in my object file A.o
nm A.obj | grep IID_
I get no symbols listed in my object file of the 'IID_IFOOBAR' that should be there since it is defin...
Hi
I want to develop a few assignment in C++ on windows.
But Visual studio does not provide a few user functionalities that makes
development a real pain.
If some one can help me out with setting netbeans C++ environment to use the same compiler that visual studio is using.
thanks
- dev Sunday .
...
I have a class whose name is YourClass. And my problem is WHY compiler do NOT generate an error for following code?
YourClass AMethod(){ return YourClass();}
AMethod() = YourClass();
[In this case IN MY OPINION AMethod just return a value (I mean it do not have a l-value).]
EDIT:
If I can do that above why I can not do following
int...
I am going to try to ask this question without supplying too much source code because all the relevant bits add up to a bunch. The key (I think?) objects involved are
using namespace o2scl;
typedef MSMTModel<TASensor,PosModel,target2d,ovector,ovector_const_subvector> TA_MSMTModel;
typedef MPC_funct_mfptr<MSMT_InitialState,TA_MSMTModel...
I have two pointers to objects and I want to test if they are the exact same object in the most robust manner. I explicitly do not want to invoke any operator == overloads and I want it to work no matter what base classes, virtual base classes and multiple inheritance is used.
My current code is this:
((void*)a) == ((void*)b)
And for...
Apologies if I'm missing something really obvious, but I'm trying to understand how to write a custom front end and back end with Pantheios. (I'm using it from C++, not C.)
I can follow the purposes of the initialisation functions (I think) but I'm unsure about the others: pantheios_be_logEntry, pantheios_fe_getProcessIdentity and panth...
Possible Duplicate:
Building a subset of boost in windows
I'm using Visual c++ 6.0, and I'd like to use boost::random. I can't find any examples showing how I would go about just using this and only this library. Can I just include it in my source?
...
Hello hello,
Im trying to figure out how i can solve an equation that has been stored in an array.
I need some guidance on how to conquer such problem.
here is my conditions
i have an array int X[30];
and in there i have stored my desired equation: 5+6*20/4
as well, i couldnt store the operants (+ / - * ) so i used different identifie...
Are there some preprocessor keywords to use to access the FILEVERSION defined in my .rc file at compile time?
I don't really want to add extra code to read the file information from the compiled product itself.
...
Hello,
Im working on a code challenge problem involving transforming a given binary matrix into another. I wrote the code in C++, and it works for the test cases i looked at, but it does not pass the online judge . The problem as well as my solution is at http://bit.ly/4SEoZ .
Can someone please tell me what could be going wrong ?
Than...
I don't quite understand the point of having a header; it seems to violate the DRY principle! All the information in a header is (can be) contained in the implementation.
...