c++

Uninstall a J2ME application through J2ME code?

Is there any way to do this? I found some Symbian C++ codes that could do it but nothing in J2ME. I have a J2ME certificate and don't have Symbian C++ certificate. Thanks in advance, Ashish. ...

Compile FastBoot (used for android user space flashing) on Windows

I have compiled FastBoot on Linux platform. But I am stucked while compile it on windows.I am using WinDDK for compilation of FastBoot on windows.In WinDDK, It is giving errors like missing "unistd.h","sys/time.h","zipfile/zipfile.h". Are there any replacement files for above said in windows?.Please suggest if any suitable method to por...

Passing objects and object oriented design best practices

I'm a university student learning programming. For practice I'm writing a blackjack program. I'm using C++ and doing an object oriented approach to this. I have a Deck class designed that basically builds and shuffles a deck of cards. The deck generated is composed of an array of 52 Card class objects. That's what I have so far. My pl...

What is the Linux equivalent to MAXDWORD?

In Microsoft Visual C++, there is a constant called MAXDWORD defined in winnt.h as follows: #define MAXDWORD 0xffffffff It's useful as a high initial value for a 'double' when one is searching for the lowest value in a collection. Google though I might, I can't find the equivalent in standard headers on Linux, but I'm willing to be...

xor definition (this sentence is to make the title acceptable)

Possible Duplicate: What does ^ do in c# (Enums)? This may be a noobish question but...nowhere have I seen what Xor means in c++ or c#. I think it might mean and/or and if it does, im smart cause that's a blind guess =D. I use c# now but im pretty sure xor means the same thing. The problem is - I don't know what xor means. ...

Using getenv function in Linux

I have this following simple program: int main() { char* v = getenv("TEST_VAR"); cout << "v = " << (v==NULL ? "NULL" : v) << endl; return 0; } These lines are added to .bashrc file: TEST_VAR="2" export TEST_VAR Now, when I run this program from the terminal window (Ubuntu 10.04), it prints v = 2. If I run the program ...

Dependency injection: do we all need to know that?

One of my friend (he is a .NET/C++ developer, as I am) asked me: Dependency injection: do we all need to know that? Why? Could you please tell: Your opinion: do we really need to know that pattern and how to implement it? Good reference (link) that could explain "why?" Thank you a lot. P.S. I am understanding that I am asking ...

Stop xsd.exe from auto generate c++ header file from xsd schema

I am using Visual Studio 2008. I have xml files and corresponding xml schemas for validation. When I modify any of schema files and save it VS automatically generate a header file,*.dll files and some garbage from it. But I don't want this. How can I stop this behaviour? ...

Member function cannot access private member

I have got the following code #include <iostream> #include <string> template <typename T> class demo { T data; public: demo(); demo(demo const&k ); demo(const T&k); demo& operator=(const demo &k); template<typename T1> demo(const demo<T1>&k); template<typename T1> demo<T>& operator=(const demo<T...

C++ simple asynchronous server library

Hi, Is there any c++ library that helps implementing a simple and efficient HTTP server able to handle a very large number of concurrent connections? I'd need something very similar to python's tornado, but for c++ Thanks ...

c++ array question

I want to initialize an double array with size 200, and its value is from 0 to 199 from index 0 to 199 in c++. i know i can do it by a simple For loop, but is there a way just to initialize the double array like this? Thanks ...

How to make 64 bit dll compatible with 64-bit editions of Windows Server 2008, Windows 7, and Windows XP?

I have compiled a dll on Windows Server 2008 64 bit edition. It works fine on that version of Windows, but if I switch to Windows 7 or XP 64 bit edition the dll does not work. How can I make the dll compatible with all three versions of 64bit edition windows? I am using Visual Studio 2010. ...

Question about bitwise And and Shift operations

How exactly do the following lines work if pData = "abc"? pDes[1] = ( pData[0] & 0x1c ) >> 2; pDes[0] = ( pData[0] << 6 ) | ( pData[1] & 0x3f ); ...

WSCInstallProviderAndChains allways fails

Hi i am trying to use this functions with parameters at first i load the ws2_32.dll with Loadlibrary then i get the function rc = lpInstallProviderAndChains( providerGuid, //guid lpszLspPathAndFile, //filename lpszLspName, //name ( IfsProvider ? XP1_IFS_HANDLES :...

how to manipulate content ostream

Hi, I have a C++ code that has a lot of functions which receives ostream as argument. I now want to string manipulate the content of this ostream. For example, I want to replace all occurrence of certain word with other word. The actual parameter to these functions is always ofstream. Is there a way to change the creation of this ofstr...

C++ : How expensive is ofstream.tellp() ?

I want to call it in a tight loop thousands of times per second . Is it an expensive call? I am using Windows Visual C++ . ...

How to get the Last Active Date of a Process?

Hi all, I have an assignment were in I have to print the last active date of the process using a COM In Proc Server in C++. I tried doing that with getProcessTimes() function, but that gives me an access violation error. First of all, I want to know if there is anyother command that gives the last active date of the process.. Second wh...

Need some help writing my results to a file

Hello guys, My application continuously calculates strings and outputs them into a file. This is being run for almost an entire day. But writing to the file is slowing my application. Is there a way I can improve the speed ? Also I want to extend the application so that I can send the results to an another system after some particular a...

How to get all duplicate symbol linker errors at once?

Hi, I am building a C++ project in XCode which uses two libraries. Say for e.g libX.a and libY.a. There are some function definitions common on libX.a and libY.a for which I get duplicate symbol linker error. This is fine, but I get only one error at a time. Once I fix the error, I'll get the next duplicate symbol error and this proces...

(student) interview questions - programming for a robotics lab

Hi all, my robotics lab is looking for programmers to work on some projects we have at the moment. We nailed down the requirements (mainly, c++ and experience with openGL and 3D), but due to obvious money constraints we can't afford to hire Great Developers. Instead we're going to settle for Talented Students, offering them projects ...