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...
i want to ascii value of '\n',
...
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...
why c method using in win32
...
In C, what is meant by "functions with a variable number of parameters"?
...
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...
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...
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...
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...
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:
...
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...
Possible Duplicate:
What is a stack overflow error?
What is a stack overflow?
...
please explain with program
...
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...
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] = ...
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...
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...
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 ...
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...
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?
...