c++

Relation between object file and shared object file

what is the relation b/w shared object(.so) file and object(.o) file can you please explain via example Thanks in advance ...

Which way I should take to evolve in programming

Hello, There is a question which really grinds my gears. I have just recently studied the documentation "What should every programmer know" and now I am at Primer C++ 4th edition. Reading this great book which hasn't any unneeded information like starting explaining STL or MFC in the beggining. It just focuses on the language. I would l...

For C++ developers, is it worth to switch from VS2005 to VS2008?

We're mostly doing C++ developing in Visual Studio 2005, and some C# coding. We're considering upgrading to Visual Studio 2008, but we're wondering if it will be worth the trouble. From what I've seen, and that is not much, VS2008 doesn't have any big advantages over VS2005. So is it worth switching to VS2008 from VS2005, or is it better...

Implementing Monitor with signaling using mutex and condition variable in C++

Did any body implemented a Monitor with signaling (wake up waiting threads) using a mutex and condition variables in C++. I dont know how to start. Any sample code or online article will be great. Are there any open source libraries who have implemented these? I need for windows and linux. But to start with windows(win32) will be fine....

QuickTime - AVID, ITU-R 601 (16-235) option

Hi! Excuse for my English I need to import the .mov file using the AVID codec. In AVID Composer program in import settings it is possible to customise Colour Levels by installation of options RGB (0-255) or 601 (16-235). How it is possible to set in a code this option (601)? I tried to set her when setting session: long lwidth;...

What features to implement in a version control system?

Hi all, I will be implementing a version control system in C++ for my final year project. I would like to know: What are the features a version control system should must support. What features do you consider are missing in existing implementations (so that my version control system does more than just reinventing the wheel ) Referen...

__int64 vs int - Memory Managed

I have a Win XP 32 bit machine . I am using Visual C++ language to test this scenario . I create a vector like vector<__int64> v . I take a note of virtual memory , say its 400 KB now. Then I push around 5 million integers in it . Now I note the virtual memory , its increased to say around 900 KB . Now I call a erase or clear on the vect...

How to setup sound intensity on windows mobile ?

I playing a sound file with a custom player, when the mobile goes in suspend mode (because the user pushed the red button) I would like to resume sound intensity when the mobile resume. How can I do ? ...

In C++, what is a "namespace alias"?

What is a "namespace alias" in C++? How is it used? ...

Program crashes when leaving a c++ function....What do you think it is?

Hi, I have a c++ code, I use MSC9 to compile it. It keeps crashing randomly. For example it crashes if it is called from Perl using `` but it does not crash when It is called from command line or from Ultimate++. I mean calling it from perl eg. f.exe arg1 arg2 arg3 Stack trace does not show much. Tracing the program line by line proved...

how to get system unique id using vc++ code?

I'm new to vc++ language so I want to get system unique id using vc++ language. so please can anybody help me in coding how to get system unique id? ...

Any OSTN02 libraries for Windows CE

I'm looking for either some C or C++ source library, or DLL or static libraries that will include Windows CE/Mobile verions, to convert between WGS84 geodetic coordinates and the OSTN02 grid and OSGM02 datum. For the Win32 platforms I already use the Quest libraries, but they have nothing for CE based platforms. I have looked at the Bl...

How can I make Visual Studio's build be very verbose?

I need to get a hold of every flag, every switch used in the build process by the Visual Studio binaries. I tried to obtain a verbose output by using vcbuild, but I wasn't able. What do I have to do to see everything performed by Visual Studio for me? It's not necessary to obtain the output in the build window. Anywhere would be fine. ...

Socket problem under C++

Hi I opened a connection a server in the following way SOCKADDR_IN SockAddr; SockAddr.sin_port=htons(445); SockAddr.sin_family=AF_INET; SockAddr.sin_addr.s_addr=*((unsigned long*)host->h_addr); // Attempt to connect to server if(connect(Socket,(SOCKADDR*)(&SockAddr),sizeof(SockAddr))!=0) { printf("Failed to establish connection wi...

Can someone explain how the signedness of char is platform specific?

I recently read that the differences between char unsigned char and signed char is platform specific. I can't quite get my head round this? does it mean the the bit sequence can vary from one platform to the next ie platform1 the sign is the first bit, platform2 the sign could be at the end? how would you code against this? Basica...

UTF8 encoded text cones in a TDesC8 variable from Xml-parser in Symbian

Hi! I'm using Carbide.c++ 2.0 to create a S60 application that consumes my own webservice. I've used the Yahoo! Image Search example as a starting point and data is shipped back and forth nicely. Problems occur when there are non-english characters in the reply so the text presented to the user in the listbox is incorrect. The XML-docume...

Convert tm structure to boost::local_time::local_date_time

How can I create a boost::local_time::local_date_time object from a tm time structure? ...

Microsoft Visual Studio: Loading resources in Qt application (without plug-in)

We don't have a Qt plug-in installed for MSVS, and it makes me wonder how/whether it is possible to load resources (images, etc) to the application. ...

How do I change the background color of a conditional macro in eclipse?

How do I change the background color of a conditional macro in eclipse? I am using the C/C++ version of eclipse so I would assume it would be associated with a mysterious preprocessor background color setting. Thanks, Chenz ...

How is heap and stack memories mananged, implemented, allocated?

In C/C++ we can store variables, functions, member functions, instances of a class either on a stack or a heap. How is each implemented? How is it managed (high level)? Does gcc preallocates a chunk of memory to be used for the stack and heap, and then doles out on request? Is original memory coming from RAM? Can a function be allo...