Hi this a continuation of a previous question I asked however I wasn't registered then and thus cannot edit the question. Anyways I have a struct
typedef struct
{
char input[100][100];
int count;
char name;
int startTime;
}INPUT;
extern INPUT *global;
this is within the header file. A stackoverflow member suggested that in my sou...
Hello,
Again I'm trying to wrap my head around Objective-C and Cocoa. So I've posted some code below. What I'm trying to do is basically use the function "th_brk_line" by entering text into a UITextField then displaying it into a UITextView once it has been processed by "th_brk_line". I've posted the external function definition and the...
Hello,
I would like to enable tabbing for my application. And so far it seems I could use a tab control. The problem with it is, though, that it creates a border around the client area. What I want, is more like a FireFox tab control, that only takes up a row in the application and doesn't create any frames around client area.
Does any...
I about to take some courses in Pattern Recognition.
As i have no prior knowledge in either C or C++, my professors told me to learn a bit of one of them before the course, and learn more when doing the course.
Which one should i pick?
The prior knowledge in programming i have is limited to mostly C# but some PHP, SQL and Prolog as wel...
Hi,
I have a simple C/CPP process running on a linux system. This is a.out.
Another process is capable to start a.out inside its code. This is b.out.
What code do I need inside a.out to understand that it is executed from the command line?
Eg ./a.out
Is there a way a process to know if it started from the cmd or started from another ...
static void do_write (void * data, gint samples)
{
void * allocated = NULL;
samples = flow_execute (get_postproc_flow (), 0, & data, sizeof (gfloat) *
samples, FMT_FLOAT, effect_rate, effect_channels) / sizeof (gfloat);
if (data != allocated)
{
g_free (allocated);
allocated = NULL;
}
apply_...
Hi!
I try to convert unsigned long long to string like this
unsigned long long Data = 12;
char Str[20];
sprintf(Str, "%lld",Data);
when i want to see
but i always see 00
Str[0],Str[1]....;
whats the wrong !!!
...
Hello all,
I am trying to program Blinky program from Keil complier to P89LPC936 microcontroller through a universal programmer(SuperPro). But the microcontroller is not running. But when i write a simple program in assambly and program the same hardware it works fine. Please I need help regarding it where i am doing wrong.
Here is cod...
I am writing multi process fibonacci number calculator , I have a file that keeps track of the fibonacci numbers , first process open the file and write first fibonacci numbers (0 and 1 ), then do fork and its child process read the last two numbers add them up and write the next into file and close the file and fork again this process c...
Hello,
i would like to know if this looks correct :
while((next !=NULL) && (strcmp(next->name, some_string) < 0) {
//some process
}
i mean, if next is NULL, then the second part of the expression won't be ever tested by the compiler ? i have heard that in C++ it's the case (but i'm not even sure of it).
Can someone confirm me th...
I recently learned about the , operator and the fact that it introduces a sequence point.
I also learned that the following code led to undefined behavior:
i = ++i;
Because i was modified twice between two sequence points.
But what about the following codes ?
i = 0, ++i;
i = (0, ++i);
While I know the rules, I can't get to a conc...
Greetings.
I am studying the way mpeg layer-III encoding works for an upcoming project. I downloaded the shine encoder as it is said to be the simpliest of all. http://www.mp3-tech.org/programmer/sources/shine.zip is the link.
My current step that i FAIL at is to compile the source codes i downloaded.
I never before worked on a lower ...
Hi all,
I'd like to develop a multithreaded UDP server in C/Linux. The service is running on a single port x, thus there's only the possibility to bind a single UDP socket to it. In order to work under high loads, I have n threads (statically defined), say 1 thread per CPU. Work could be delivered to the thread using epoll_wait, so thre...
I'm trying to implement a lagged Fibonacci pseudo-random number generator for integers up to some maximum. It maintains an array of values
int values[SIZE] = { /* 55 seed values */ };
and uses the following function to return the next value
unsigned lagfib()
{
static unsigned idx = 0;
int r = values[idx];
/* The followin...
Why does the following call:
printf("%d %d", 'a', 'b');
result in the "correct" 97 98 values?
%d indicates the function has to read 4 bytes of data, and printf shouldn't be able to tell the type of the received arguments (besides the format string), so why isn't the printed number |a||b||junk||junk|?
Thanks in advance.
...
Possible Duplicate:
Is array name a pointer in C?
Are arrays and pointers implemented differently? I have come across this question because , in both the cases we access elements from the starting address of an element.So , there should be close relation between them . Please explain the exact relation between them . Thanks.
...
Greetings.
I am studying the way mpeg layer-III encoding works for an upcoming project. I downloaded the shine encoder as it is said to be the simpliest of all. http://www.mp3-tech.org/programmer/sources/shine.zip is the link.
I successfully compiled them in a standalone project but i need to be using them in a QT project.
I made new ...
For practice, I've been working on a compressor which does the find-repeated-parts, make-dictionary, compress-with-huffman codes thing.
It's not really working.
One of the problems is, for some reason my sorting algorithm drops keywords from the dictionary. I think the problem is in the swap routine, but I'm not sure.
( this routine ...
Hi,
How much data can be malloced and how is the limit determined? I am writing an algorithm in C that basically utilizes repeatedly some data stored in arrays. My idea is to have this saved in dynamically allocated arrays but I am not sure if it's possible to have such amounts malloced.
I use 200 arrays of size 2046 holding complex dat...
I'm having a heck of a time figuring out how to use the sax parser for libxml2. Can someone post an example that parses this XML ( yes, without the <xml...> header and footer tags, if that can be parsed by the libxml2 sax parser):
<hello foo="bar">world</hello>
The parser should print out the data enclosed in element hello and also g...