c

is there a good c/c++ to delphi converter(software)

i need a tool that can convert c/c++ code to delphi(object pascal) code, have tried openc2pas but it is pretty much useless and a pain to use is their a usable alternative?(free or commercial) ...

fopen file from windows network location

I can open files from a mounted network drive, but not from an unmounted one e.g \\mycomp\folder2\hi.bmp Any work around for this? ...

ASCII DOS Games, need help with Rendering methods!

I'm writing an old school ASCII DOS-Prompt game. Honestly I'm trying to emulate ZZT to learn more about this brand of game design (Even if it is antiquated) I'm doing well, got my full-screen text mode to work and I can create worlds and move around without problems BUT I cannot find a decent timing method for my renders. I know my ren...

Why do some experienced programmers write expressions this way?

Possible Duplicates: How to check for equals? (0 == i) or (i == 0) Why does one often see null != variable instead of variable != null in C#? I've been having a look at an odd tutorial here and there as well as some DirectX code and noticed that many experienced C++ programmers write expressions in the following way: (<cons...

choosing the element with more duplicates on an array in plain C

This question brings me back to my college days, but since I haven't coded since those days (more than 20 years ago) I am a bit rusty. Basically I have an array of 256 elements. there might be 1 element on the array, 14 or 256. This array contains the usernames of people requesting data from the system. I am trying to count the duplicat...

Adding members to a C-style struct and backwards compatibility

Say I have a struct defined somewhere deep in low-level code used all over the place in the most crazy and unknown ways: struct T { unsigned short name_len; char d_name[LENGTH]; } With accompanying functions that fill d_name with whatever needs to be put there, like struct T* fill( somethingOrOther* X) And I would like to e...

Declaring an array in C without giving size

When declaring an array like this: int array[][] = { {1,2,3}, {4,5,6}}; I get an error saying: "Array type has incomplete element type" What is going on?? ...

Maximizing performance on udp

hey. im working on a project with two clients ,one for sending, and the other one for receiving udp datagrams, between 2 machines wired directly to each other. each datagram is 1024byte in size, and it is sent using winsock(blocking). they are both running on a very fast machines(separate). with 16gb ram and 8 cpu's, with raid 0 drives. ...

Need C#/C++ DLL Advice

I have successfully gotten Dreamweaver to accept my DLL and call it's methods. The DLL is written in C++ with C interpeted functions (so function names aren't mangled.) I would like to become comfortable with C++ pointers and datatype, but I have a much stronger proficiency with C# so for our timeline I think it's worthwhile to investig...

Graphical artifacts with OpenGL?

I'm not sure if its called a graphical artifact but see this: http://img835.imageshack.us/img835/9785/anomoly.png You will notice 6 pixels on the black outline that are out of place. My application allows zooming in and when I render I do this: RENDER: // Set an orthogonal projection matrix glMatrixMode(GL_PROJECTION); glLoad...

Multiple Passive connections to vsftpd server

Hi, I am trying to upload multiple files simultaneously. after establishing a data connection in passive mode, my client sending another "pasv" request to the vsftp server to get server and port value. so that i can connect to the vsftpd using the new set of port and ip values. but server(vsftpd) is not responding for this second pasv co...

getchar behaviour at netbeans IDE

Compiling this code with netbeans 6.8 C++ (mingw) for(int i=0;i<100;i++) { printf("\r\ntest"); } getchar(); It don't print one hundred times the "test" word.. It just execute the getchar() prior the printf loop It's a netbeans problem, because it executes trough c:\msys\1.0\bin\sh.exe obviously if I try it...

thread safe path comparison or canonicalization function for Unix?

I'd seen some ancient code that simplifed Unix paths for comparison by doing something like the following pseudocode: strip off the last path component to get a directory only part: /foo/bar -> /foo getcwd and remember original path chdir /foo getcwd and remember to return to caller chdir old original path Is there a standard Unix sy...

Linux C: Easy & 'pretty' dump/printout of structs (like in gdb) - from source code?

I am having a slight problem with some structs in a kernel module I'm building, so I thought it would be nice if there was an easy way to print out structs and their values - and below is a small userland example of what I mean. Say we have the simple C example as below (given in form of a bash commands): FN=mtest cat > $FN.c <<EOF #i...

C basic datatype problem - const char * to LPCTSTR

#include "stdafx.h" #include "string.h" #include "windows.h" bool SCS_GetAgentInfo(char name[32],char version[32], char description[256], const char * dwAppVersion) { strcpy(name,gName); strcpy(version,gVersion); strcpy(description,gDescription); notify(dwAppVersion); return true; } void notify(const char * msg) { ...

Do all C++ compilers generate C code?

Probably a pretty vague and broad question, but do all C++ compilers compile code into C first before compiling them into machine code? ...

C Handles - How to work with them?

I have in some documentation for a plugin for Dreamweaver I am making that says the following: void **connectionData • The connectionData argument is a handle to the data that the agent wants Dreamweaver to pass to it when calling other API functions. I have no other information than this from the manual in regard to con...

Internal and External IP Address in 10.4

IMPORTANT EDIT It seems I've caused a lot of confusion in this post by differentiating between 'internal' and 'external' IP addresses. Allow me to try to clarify: Internal = PRIVATE IP ADDRESS External = PUBLIC IP ADDRESS The concept of internal and external were completely of my own invention. Apologies. Hey Everyone, With your he...

OpenGL: Fire event on new geometry creation

In specific I am working in linux environment. This is an opengl application. Upon a calculation of certain geometries, I want to be able to fire an event whenever a new geometry is created. Is there any .NET equivalent of events in C ?? Thanks, Vishnu ...

aggregate initializer vs. implicit structure padding.

In code like the following, we typically have an implicit pad of 2 bytes at the end of the structure: struct foo { int32_t x ; int16_t y ; // <<< 2 bytes for total sizeof(foo) == 8 } ; I was asked today what an aggregate initializer does with the extra two bytes: foo o = { 0, 0 } ; ie: is this going to be equivalent to foo o ;...