c

This may be due to a corruption of the heap, which indicates a bug in cvector.exe or any of the DLLs it has loaded.

I make many mistake in the test program!!! debug src: http://www.cppblog.com/Files/mymsdn/cvector-windows-has-triggered-a-breakpoint-in-cvector.zip the right version: http://www.cppblog.com/Files/mymsdn/cvector-svn-version-10.zip I am trying to write a C language version of vector struction. If I try run (in Microsoft Visual Studio 2...

what is the ascii value of \n?

i want to ascii value of '\n', ...

Any good reason to #include source (*.c *.cpp) files?

Hello all, i've been working for some time with an opensource library ("fast artificial neural network"). I'm using it's source in my static library. When i compile it however, i get hundreds of linker warnings which are probably caused by the fact that the library includes it's *.c files in other *.c files (as i'm only including some h...

what is the relationship between c and win32?

why c method using in win32 ...

What is meant by "functions with a variable number of parameters"?

In C, what is meant by "functions with a variable number of parameters"? ...

What are alternatives to the GetShortPathName function?

I'm looking for a function which can return the 'short' (8.3 notation) path for a given 'long' path. However, the GetShortPathName function (which seemed like a perfect fit) doesn't work for me since it requires thata file with the given long path exists already. What other options do I have for computing the 8.3 path for a given long...

Japanese half/full width conversion

Hi all, I'm facing a character width problem in Japanese using glib::ustring. I have this string: ウェッジパンプス I want to convert it to: ウエッシパンプス Using ustring::normalize, i get this string: ウェッジパンプス (in fact, here, each character with accent fills two characters width) Is there a standard method to do this kind of processing? Is ICU b...

How to declare extern typedef struct?

Hi there, I have two c files, foo.c with the functionality and test_foo.c which test the functions of foo.c. Is there a way to access the struct typedef BAR I defined in foo.c in test_foo.c without using a header file? So far, I was able to avoid a h file so that the whole program would consist of foo.c. Thanks. foo.c typedef struc...

return nothing from non-void function in C

what is considered best practice in the following snippet: int foo(struct data *bar, struct info bla) { if (!bar) { bla->status = 0; return; } ... } in fact, it works fine. but i'm feeling uncomfortable with gcc giving me a warning. here is the actual code: static int pop(struct stack **stack, struct in...

Where should I create global variables for targets

I have an Xcode project with two targets for two different apps. There are a lot of #ifdef statements sprinkled throughout the code #ifdef PROJECT_ONE NSArray *dbKeys = [[NSArray alloc] initWithObjects: @"name", @"zip", @"phone", nil]; #else NSArray *dbKeys = [[NSArray alloc] initWithObjects: ...

Anonymous union within struct not in c99?

Hi, here is very simplified code of problem I have: enum node_type { t_int, t_double }; struct int_node { int value; }; struct double_node { double value; }; struct node { enum node_type type; union { struct int_node int_n; struct double_node double_n; }; }; int main(void) { struct int_no...

What is a stack overflow?

Possible Duplicate: What is a stack overflow error? What is a stack overflow? ...

Can include files be nested?

please explain with program ...

Why am I able to change the contents of const char *ptr?

I passed a pointer ptr to a function whose prototype takes it as const. foo( const char *str ); Which according to my understanding means that it will not be able to change the contents of ptr passed. Like in the case of foo( const int i ). If foo() tries to chnage the value of i, compiler gives error. But here I see that it can cha...

C write() doesn't send data until close(fd) is called.

So I have this test code to send "HELLO" over a USB serial port: int fd; struct termios tty; if((fd = open("/dev/ttyUSB0", O_WRONLY|O_NONBLOCK|O_NOCTTY)) == -1){ err(1, "Cannot open write on /dev/ttyUSB0"); } tcgetattr(fd, &tty); tty.c_iflag = 0; tty.c_oflag = 0; tty.c_lflag = 0; tty.c_cflag = 0; tty.c_cc[VMIN] = 0; tty.c_cc[VTIME] = ...

How to best deal with Windows' 16-bit wchar_t ugliness?

I'm writing a wrapper layer to be used with mingw which provides the application with a virtual UTF-8 environment. Functions which deal with filenames are wrappers which convert from UTF-8 and call the corresponding "_w" functions, and so on. The big problem I've run into is that Windows' wchar_t is 16-bit. For filesystem operations, it...

Unexplainable behavior in C. Odd vs Even number of strings

So I have a problem that I can not figure out. I am writing some code in C. I kept winding up with issues where reading from the network would seemly randomly work. I finally traced it down to the number of strings in the code. I cant believe it but I have verified it pretty in depth. The code base is rather massive so I am not sure o...

How does Flash communicate with dll files

Hi, I want Flash to communicate directly with dll files. How can I do this? If Flash works, great! I just need an honest and descriptive answer Thanks, REQUIREMENT: • Work without a server • Understand what protocol I can use DESCRIPTION: • Flash GUI interface • Stand alone unit • It has a change acceptor and other hardware There's ...

Getting into Embedded

I'm trying to familiarize myself with the embedded field, but also have limited resources in terms of time and equipment to buy. What's a good language to wrap my head around embedded, without investing too much time leaning an embedded-specific language? I'm most familiar with PHP, Java, Actionscript, but unfortunately know very litt...

C compiler/IDE for Windows 7?

Possible Duplicate: Best C++ IDE or Editor for Windows What is a good compiler and/or IDE for C that runs on modern Windows systems? ...