c

How can I do the instruction level debugging with CDT

I am using CDT for developing C programs. When the debugger stops on a break point and I do "Step Over" or "Step Into" the debugger behaviour is based on the source line level but not on the instruction level. Can I do debugging on the instruction level in CDT? ...

reference variables in c++

this might be silly!!! but i am eager to know about it:) why are reference variables not present/used in C? why are they designed for C++? ...

Using FFMPEG Audio conversion in the iPhone.

Hi to everybody, I'm using ffmpeg in the iPhone, reading an wma stream from an mms server, but I want to save the stream to an m4a file using the ALAC encoder in ffmpeg, the problem is that trying to save the raw stream, the stream processed using avcodec_decode_audio2 , the file is not even recognized with the wma format, and obviously...

Generating a random cubic graph with uniform probability (or less)

While this may look like homework, I assure you it's not. It stems from some homework assignment I did, though. Let's call an undirected graph without self-edges "cubic" if every vertex has degree exactly three. Given a positive integer N I'd like to generate a random cubic graph on N vertices. I'd like for it to have uniform probabilit...

how to initialize a global const pointer?

I have a variable which is the head to a linked list. I want to make it const because it should never be changed, the variable is used throughout the program, so I thought I should make it a global const. The problem is that I couldn't initialize it after I declared it const. How can I get around this problem? typedef struct PT { ...

Dealing with char buffers.

As a C++ programmer I sometimes need deal with memory buffers using techniques from C. For example: char buffer[512]; sprintf(buffer, "Hello %s!", userName.c_str()); Or in Windows: TCHAR buffer[MAX_PATH+1]; // edit: +1 added ::GetCurrentDirectory(sizeof(buffer)/sizeof(TCHAR), &buffer[0]); The above sample is how I usually create lo...

How could one implement C++ virtual functions in C

Possible Duplicate: Object oriented programming in C The C++ language provides virtual functions. Within the constraints of a pure C language implementation, how can a similar effect be achieved? ...

where pointers and global variables in C are saved in memory, in heap or in stack?

where pointers and global variables in C are saved in memory, in heap or in stack? ...

processing files in 64 bit machine but developing in 32 bit machine

i am going to read a TDMS file in matlab using Mexfunction in C language in a 64 bit windows machine, but i will develop the app in 32 bit windows machine. i know in there is a difference between 32 bit machine and 64 bits with the size of variables. i used a lot of fread(.. sizeof(type)..). is it going to be a problem when it is running...

Programmatically make a Header item 'hot' or 'selected'

I'm using a Win32 Header. I want to make it so that the header item I click on stays 'selected' or looks selected until I press another one. I want to avoid disabling it for aesthetic reasons. Thanks ...

SVNKit like wrapper for C or C++

Before I start building one myself; Is there a wrapper for C or C++ which does the same thing as SVNKit? ...

In C/C++, are volatile variables guaranteed to have eventually consistent semantics betwen threads?

Is there any guarantee by any commonly followed standard (ISO C or C++, or any of the POSIX/SUS specifications) that a variable (perhaps marked volatile), not guarded by a mutex, that is being accessed by multiple threads will become eventually consistent if it is assigned to? To provide a specific example, consider two threads sharing ...

Segmentation Fault when run loop 41881 times

I am writing a C program that reads a text file and parses the data in it into various fields. The text file I am reading from is very large though (31MB) and when I run the program on a text file that has 41880 lines of input everything works fine. I will ultimately need to read from text files that are much much larger than that thou...

What puzzles me...Are .NET languages the mainstream languages for Windows (standalone) applications?

I'm an inquisitive .NET student without any commercial working knowledge and I have been puzzled by what exactlty are .NET languages meant for? Q1.If you look on job websites, .NET seems mainly used for web applications, not much for Windows applications? (My dream job is to develop standalone small Windows applications.) Q2.Are most ...

What is the relationship between C and the Windows API?

I looked at some other questions on SO and its not clear if c is built on top of, under, or alongside the WINAPI. Like for example could someone write something in pure c that was able to open a window, or would they need to use the windows api? I noticed similarities between the c (library?) version of opening a file (fopen) vs the w...

How to concatenate using lstrcat in Visual C++?

Hi, I would like to append two strings together so that I can rename a file using the MoveFile function. But my strings refuse to concatenate, so instead of adding "E:\" to "FILE-%s-%02d%02d%02d-%02d%02d.txt" to give me "E:\FILE-%s-%02d%02d%02d-%02d%02d.txt", it gives me just "E:\" as if nothing happened. Here is a snippet of my full c...

What control style is this?

I want to make a control where the bottom is nice and beveled as seen here: http://img19.imageshack.us/f/finalzh.png/ What style must I add to my control to achieve the same look as this? Thanks ...

Add tabs in reverse order?

By default tabs get added from right to left, so if I insert 1,2,3,4,5 then the tabs will read 5,4,3,2,1. How can I make it read 1,2,3,4,5 thanks. http://img96.imageshack.us/i/ahhh.png/ This is obtained from inserting Untitled Project first and Untitled 5 last. What I would want would be for Untitled 5 to be selected at the far right ...

Parsing a line with a variable number of entries in C or C++ (no boost)

I have a file containing lines of the form, double mass, string seq, int K, int TS, int M, [variable number of ints] 688.83 AFTDSK 1 1 0 3384 2399 1200 790.00 MDSSTK 1 3 1 342 2 I need a (preferably simple) way of parsing this file without boost. If the number of values per line ...

Creating a control like this

How could I create a control that looks like this one: I just want that small end. Thanks ...