c

Is there any tool which can generate a report for a valid C program

Hi all, is there any tool that can parse a valid C program and generate a report which contains list of functions, global variables, #define constants, local variables in each function etc. ...

Which language is useful to create a report for a valid C program

Can anyone suggest me a helpful programming language which can be used to create a tool which will analyse the given C program and generate a txt report or html report containing information about the given program (function list, variable list etc). The program I intend to build is similar to doxygen but i want it for my personal use. ...

Safe remove USB-Drive using Win32 API?

Anyone knows how to remove a USB drive using the win32 API? I do a lot of work on embedded systems and on one of these I have to copy my programs on a usb-stick an insert it into the target hardware. Since I mostly work on the console I don't like to use the mouse and click on the small task-bar icon hundret times a day. I'd love to w...

Is there a good and free ide for c/c++ in linux?

I'm used to work with SourceInsight for windows which works great, shows caller and callee for each function, shows the content of a function the cursor is on and smartly auto-completes symbols across project. I don't feel like falling into the long learning curve of vim/emacs. I want productivity and I want it fast (I don't mean a cons...

How best to alleviate scenarios that trigger non-incremental linking (MSVS)

While incremental linking addresses much of the time spent linking, even for very large projects, I find the incremental linker in MSVS to be pretty haphazard. (I'm currently using 2003 atm, would love to hear if 2005/8 addressed any of this.) My list of known triggers include: changing anything external to the main .exe project will...

What Does {0} Mean in C?

When {0} is used to initialize an object in C/C++, what does it mean? I can't find any references to {0} anywhere, and because of the curly braces Google searches are not helpful. Example code: SHELLEXECUTEINFO sexi = {0}; sexi.cbSize = sizeof(SHELLEXECUTEINFO); sexi.hwnd = NULL; sexi.fMask = SEE_MASK_NOCLOSEPROCESS; sexi.lpFile = lpFi...

How do you read C declarations?

I have heard of some methods, but none of them have stuck. Personally I try to avoid complex types in C and try to break them into component typedef. I'm now faced with maintaining some legacy code from a so called 'three star programmer', and I'm having a hard time reading some of the ***code[][]. How do you read complex C declaration...

AssignProcessToJobObject fails with "Access Denied" error when running under the debugger

You do AssignProcessToJobObject and it fails with "access denied" but only when you are running in the debugger. Why is this? ...

What is a Privileged instruction?

I have added some code which compiles cleanly and have just received this Windows error: --------------------------- (MonTel Administrator) 2.12.7: MtAdmin.exe - Application Error --------------------------- The exception Privileged instruction. (0xc0000096) occurred in the application at location 0x00486752. I am about to go on a ...

Easiest cross platform widget toolkit?

What is the easiest cross platform widget toolkit? that minimally covers Windows, osx, and Linux with a c or c++ interface? ...

Free hosting for C CGI

For an Open Source project, I'd like to allow people to test the application via WEB to see if it's what they were looking for. The application is in C but I've not found a free hosting that would allow me to upload my application. The reason why in general they don't allow to do it is rather obvious but maybe there's an OS-friendly se...

How to get all datatype sizes and function stack footprint sizes in a C/C++ project?

I have a large inherited C/C++ project. Are there any good tools or techniques to produce a report on the "sizeof" of all the datatypes, and a breakdown of the stack footprints of each function in such a project. ...

What is the real difference between Pointers and References?

AKA - What's this obsession with pointers? Having only really used modern, object oriented languages like ActionScript, Java and C#, I don't really understand the importance of pointers and what you use them for. What am I missing out on here? ...

Why can't variables be declared in a switch statement?

I've always wondered this - why can't you declare variables after a case label in a switch statement? In C++ you can declare variables pretty much anywhere (and declaring them close to first use is obviously a good thing) but the following still won't work: switch (val) { case VAL: // This won't work int newVal = 42; brea...

Variable declarations in header files - static or not?

When refactoring away some #defines I came across declarations similar to the following in a C++ header file: static const unsigned int VAL = 42; const unsigned int ANOTHER_VAL = 37; The question is, what difference, if any, will the static make? Note that multiple inclusion of the headers isn't possible due to the classic #ifndef HE...

Where are static variables stored (in C/C++)?

In what segment (.BSS, .DATA, other) of an executable file are static variables stored so that they don't have name collision? For example: foo.c: bar.c: static int foo = 1; static int foo = 10; void fooTest() { void barTest() { static int bar = 2; static int bar = 20; foo...

A free tool to check C/C++ source code against a set of coding standards?

It looks quite easy to find such a tool for Java (Checkstyle, JCSC), but I can't seem to find one for C/C++. I am not looking for a lint-like static code analyzer, I only would like to check against coding standards like variable naming, capitalization, spacing, identation, bracket placement, and so on. ...

What is the best c complier for the Pic18 micro

We are starting a new project based a microchip PIC18F252. What is the best 'c' compiler to use? ...

Are POD types always aligned?

For example, if I declare a long variable, can I assume it will always be aligned on a "sizeof(long)" boundary? Microsoft Visual C++ online help says so, but is it standard behavior? some more info: a. It is possible to explicitely create a misaligned integer (*bar): char foo[5] int * bar = (int *)(&foo[1]); b. Apparently, #...

What is a variable's linkage and storage specifier?

When someone talks about a variables storage class specifier, what are they talking about? They also often talk about variable linkage in the same context, what is that? ...